Feb 07, 2019 05:11 PM
I keep getting ERROR code
My formula is DATETIME_PARSE({UNIXTIME},‘x’, ‘EST’)
How can I convert a 13 digit unix time stamp into a date like this: 2/7/2019 8:09pm
I have this:1549584840000
I need this: 2/7/2019 8:09pm
Feb 08, 2019 04:57 AM
I think your problem is the locale modifier you’re using; ‘EST’ doesn’t seem to be valid. (To be honest, I didn’t know DATETIME_PARSE()
even supported a third variable; it’s optional.) AFAIK, the ‘locale’ option doesn’t do anything with the timezone, as such — that is, I don’t think it will take a datetime value (presumably at some standard timezone and shift it appropriately for the locale; it controls such things as spelling of the day of the week and culturally appropriate formats.
A list of acceptable locale modifiers can be found here — or, unless you have a specific need for it, just leave it off.
To force a timezone, you need to use SET_TIMEZONE()
, typically in conjunction with DATETIME_FORMAT()
.
Feb 20, 2019 04:29 PM
I’m having the same issue here.
I’ve tried everything suggested here as well-
Just throws errors. 13 digit unix timecode. Just need a formula to convert to D/M/YYYY in (what I’m assuming is automatically determined as) PST timezone
Feb 20, 2019 04:33 PM
Nevermind :slightly_smiling_face: I think the problem I had was that I was trying to parse a string field rather than an integer. Once I converted the source column, it works great!