Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Conversion from EPOCH milliseconds to Date

Hi,

 

I have some epoch numbers stored as type long in milliseconds.

examples are:

1517408220000

1456932600000

 

Using an online converter (https://currentmillis.com/) i get the following which is correct:

Wed Jan 31 2018 14:17:00

Wed Mar 02 2016 15:30:00

 

What would the expression be to do this within a TMap, although i would want the output formatted differently as dd/mm/yyyy.

 

Please could anyone assist me.

 

Thank you

 

 

Labels (2)
1 Solution
4 Replies
manodwhb
Champion II
Champion II

you can use below way in tmap.
new java.util.Date((long)(row1.Epoch*1000)/1000)

i just created a job for you,please check the job


epochdate.zip
Anonymous
Not applicable
Author

Thank you. I followed this before and realised now that i needn't multiply by 1000.

CSharma1636705679
Contributor
Contributor

Hello, Sir how can I convert this into GMT0 I followed your solution and got successful in converting epoch time into timestamp but it is taking my system's timeZone how can I set it to take GMT0 !! please Help

Thanks