Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Date parms for iSeries SQL procedure
BWill
Hello,
I'm using BIRT ver 2.5. I'm new to it and have created a report that connects to our iSeries and runs a SQL stored procedure that I created. My issue is that I have from and ending date parameters. The iSeries accepts the parameters in the format: 2009-03-01-00.00.00.000000. The report runs fine when the parms are passed in this format. However, I do not expct the user to input such a long parm. Every format I have tried gives an incorrect datetime value - not sure if it is coming from BIRT or the iSeries. Has anyone had success with date parme to the iSeries? Thanks in advance.
Find more posts tagged with
Comments
mwilliams
Hi BWill,
So, you expect the users to enter the values of yyyy-MM-dd, but have to pass the value as yyyy-MM-dd-00.00.00.000000? I don't have a way to try this, but could you just take their date value they enter and format it with the above date format? Or is that something that you've tried already?
BWill
I would actually like them to enter in a format most peple are used to - ie. mm/dd/yyyy (at least in the US). I tried creating a custom format but did not have any luck. I'm used to sql reporting ervices where the user just picks a date range from a date picker. I then add a day to the end date parameter entered since the time stamp is 00:00:00. BIRT does not seem to like time formatted in a 24 hour clock though....
mwilliams
BWill,
If you can format the date entered by the user, "MM/dd/yyyy", before sending it out in your SQL with something like:
df = new Packages.java.text.SimpleDateFormat("yyyy-MM-dd-00.00.00.000000");
newParameter = df.format(params["date"]);
You will probably be able to achieve what you're wanting if this is the format that your iSeries is looking for.
Let me know.