Convert epoch time in input to human readable date

0

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-01

Result: 25/12/1969

How to solve my problem? Thanks!

hanviet2003's picture
Joined: Oct 5 2012 - 8:28pm
Last seen: 6 years 10 months ago
Problem solved: new java.text.SimpleDateFormat("dd/MM/yyyy").format(new java.util.Date ($P{report_time}.longValue() * 1000))
hanviet2003 - 6 years 10 months ago

0 Answers:

No answers yet
Feedback
randomness