Jaden
February 15, 2024, 7:21pm
1
Hi,
I am working with a JSON file, and I have a timestamp in milliseconds (e.g. 1605034099143657).
I was wondering was there any way to convert this to a readable date? (e.g. yyyy-MM-dd HH:mm:ss)
I have tried to use the convert data type action, but it doesn't seem to work.
Thanks!
dgudkov
February 15, 2024, 7:33pm
2
That looks like a Unix timestamp. Use FromUnixTime() .
Jaden
February 15, 2024, 8:15pm
3
I still seem to be getting an error when I use FromUnixTime().
Error: #Inappropriate argument for FromUnixTime(number)
dgudkov
February 15, 2024, 8:17pm
4
Make sure what you're converting is numbers, not text that looks like numbers. Read the help article on the function to understand what input type is requried.
Jaden
February 15, 2024, 8:37pm
5
I was able to find the answer here: Fromunixtime function working? - General Q&A - EasyMorph Community - Data preparation professionals and enthusiasts
Apparently I have a 16 digit number and it needs to be 10 digits. This was able to get me to the date number I needed.
Thanks Dmitry!
1 Like