bbromonti Posted September 21, 2010 Share Posted September 21, 2010 Hi,I have the following problem:I get "pretty" and user-friendly dates from the database: "dd/mm/yyyy", but iReport transforms them into "dd/mm/yy h:mm" which is a bit disturbing, at least users will complain about it..How could i maintain the original "dd/mm/yyyy" format?(the column type in the database is date, iReport gets it as java.util.Date, the field on the report si also java.util.dateand Date has quite few not deprecated functions left...) Link to comment Share on other sites More sharing options...
bbromonti Posted September 23, 2010 Author Share Posted September 23, 2010 I have tried to also to transform a string (dd/mm/yyyy) with new SimpleDateFormat ("dd/mm/yyyy").parse($F{myDateAsString})but it still gives the same dd/mm/yy h:min format.How could i get free from the h:min at the end? Link to comment Share on other sites More sharing options...
itpragmatic Posted September 23, 2010 Share Posted September 23, 2010 ok. Would you mind to try this? Go to the properties of the corresponding text field of your date and under pattern tab click on date and select the format that is 'dd/mm/yyyy'. Also I believe your expression class is set to java.util.date. Best. Link to comment Share on other sites More sharing options...
bbromonti Posted September 23, 2010 Author Share Posted September 23, 2010 Thank you very much!!!!It functions!!!!! Link to comment Share on other sites More sharing options...
vinothkumarneptunesoftwar Posted August 18, 2014 Share Posted August 18, 2014 Hi I need to achieve the above requirement with HTML5 charts,when i tried like below new simpleDateFormat ("dd/mm/yyyy").parse($F{PERIOD}) Note:$F{PERIOD} is in Time stamp I am getting the error like below"SimpleDateFormat Cannot be resolved to a type" RegardsVinoth 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