How to convert unix timestamp to date to use in adhoc view

0

I got an adhoc view working, but when i tried to group by months, the dates weren't recognized as dates, because they are unix timestamps.  

I googled around, and found a few solutions that were posted a year+ ago, but none of them worked.  This included using java functions, and the UNIX_TIMESTAMP_TO_UTC (or whatever the actual function is), both by changing the field in the domain, and by trying to change the field in the adhoc view.  When I change it in the domain, it just ends up erroring out with some mesage about a previous field failing to make edits, and if i change it in the ad hoc view it says they aren't functions.

Has this changed in the newest forms of jaspersoft?  Whats the correct way to do it now?

trowley's picture
Joined: Jul 7 2015 - 1:05pm
Last seen: 4 years 1 month ago

1 Answer:

0

Are you getting your data from a database table? Just convert the dates in your sql statement and use the sql statement in Domain - Derived Table.

hozawa's picture
46877
Joined: Apr 24 2010 - 4:31pm
Last seen: 2 months 1 week ago
Feedback
randomness