ramandeep1980 Posted June 5, 2013 Share Posted June 5, 2013 Hi,I am having some major trouble in changing Date format in ireport.I am geting data from XML datasource as- 2013-02-13T22:07:37.589-05:00 and I want to change it to this 30-Feb-13 10:07 PM EST.But some how jasper is not able to understand the incoming format from XML.Regards,Raman Deep Singh Link to comment Share on other sites More sharing options...
Thomas Zimmer Posted June 6, 2013 Share Posted June 6, 2013 Hi Raman,although I do not understand your whole date string, you should s.th. like the following: configure your xml datasource with a date pattern:yyyy-MM-dd'T'HH:mm:ss.SSSif the 'T' means s.th. special (I don't know) replace it with the according character from the patterns: http://docs.oracle.com/javase/tutorial/i18n/format/simpleDateFormat.htmlProblematic - as far as I can see - is the timezone, because it's not standard; it should be either "PMT-05:00" => z or "-0500" => Z. Like this, you only can leave it away.Set the field in the report as java.util.Date, insert into text field with pattern:dd-MMM-yy hh:mm aaa(again, leaving away the timezone)Hope this helps,Cheers, Thomashttp://www.thomaszimmer.net 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