Jump to content
Changes to the Jaspersoft community edition download ×

Convert epoch time in input to human readable date


hanviet2003

Recommended Posts

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!

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

  • 11 years later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...