hanviet2003 Posted October 10, 2012 Share Posted October 10, 2012 When design in iReport, I tried to convert parameter integer (epoch time) to human readable date on report.In expression I use this: new java.text.SimpleDateFormat("dd/MM/yyyy").format(new java.util.Date ($P{report_time} * 1000))For example:Parameter Class: java.lang.Integer.Value: 1343754000 = 2012-08-01Result: 25/12/1969How to solve my problem? Thanks! Link to comment Share on other sites More sharing options...
hanviet2003 Posted October 10, 2012 Author Share Posted October 10, 2012 Problem solved: new java.text.SimpleDateFormat("dd/MM/yyyy").format(new java.util.Date ($P{report_time}.longValue() * 1000)) Link to comment Share on other sites More sharing options...
Scott Andersen Posted October 18, 2023 Share Posted October 18, 2023 Epoch for "2012-08-01" is 1343800800000 (for the start of the day) 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