Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Convert Java time stamp

Hello,

have some issues with getting the correct time stamp from an oracle database that uses java timestamp. This is the instructions I got from the database administrator:

We store the time as long in the standard unix format, which is milliseconds from 01/01/1970 GMT. When you want to convert the long to a date, you have to specify the timezone to get the correct date.

I have trid this:

Let vBASE = num(makedate(1970,01,01))

date($(vBASE) + floor(TRANS_TIME/(24*3600*1000))) as Date

and this

date(ConvertToLocaltime(floor(TRANS_TIME/(24*3600*1000)+($(vBASE))))) as Date

I almost get it right but it differs on some transactions each month shift which I'm suspecting has something to do with the time zone.

Any suggestions as how to parse the dates correctly? The look like this :

1230888573653



0 Replies