0

I have a long column which gives epoch (which i can convert to date time perfectly)

enter image description here

I tried to do the same in palantir using below code as advised here.

CAST(CAST((utc_column) AS TIMESTAMP) AS DATE)

But my contour analysis in palantir converts the date as 55346-06-08. I tried the column editor too and it gave the same result. Any idea as to how can i convert epoch time to correct date time in Palantir?

asb
  • 781
  • 2
  • 5
  • 23

1 Answers1

0

UNIX time you have is given in milliseconds, the CAST AS TIMESTAMP assumes it's in seconds. All you have to do is divide by 1000 before converting.

Your expression should be: CAST(CAST((utc_column/1000) AS TIMESTAMP) AS DATE)