jimmy514in Posted December 7, 2010 Share Posted December 7, 2010 Hello Everyone, I am posting here because of an issue trying to format the input date parameter.I was also on the look out for some good tutorials to use ireports for making jasper reports. My problem is that I am trying to use the input parameter as a date , it has a different format, once received, it is in date format. this is because the input is being passed by the ireport. Now , after receiving the date parameter. I am trying to format in the form of yyyy-MM-dd . Now since I am new to ireports. I am trying to understand how to make used of the $P{startDate} which is the input to get converted to a String with the format mentioned above , so that I may use it in my query for further processing.So, in essence, I want to format my Date input to Simple Date format yyyy-MM-dd in jrxml? Please let me know if there are any good tutorials on Jasper Server and Ireports. Link to comment Share on other sites More sharing options...
rakeshenoch Posted December 16, 2010 Share Posted December 16, 2010 Use this in your text field expression of a new parameter say abc and then use this abc in your querynew SimpleDateFormat('yyyy-MM-dd").format($P{startDate});Hope this helps!!! Link to comment Share on other sites More sharing options...
hozawa Posted December 18, 2010 Share Posted December 18, 2010 As for the tutorial, I think the best is to buy the Ultimate Guides and some Apress books. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now