Hi all ,
I am very new to alteryx. I am trying to convert an unix time stamp(Publishing date JavaScript equivalent of a DateTime
how many milliseconds have passed between now and the beginning of 1970: for example:1474315762000) to date in alteryx. I am getting all the data in from an API in json format and parsing it as string.
I need solution for
how to convert from unix time(data type :string) to date in alteryx! (FYI i tried datetimeadd, and did not work properly)
Any help would be appreciated
regards
Nagarjuin Srinivas
Solved! Go to Solution.
Probably the easiest way it is to use a select tool to convert to an Int64.
You can then use a formula tool to convert to a datetime by adding seconds to 1970-01-01:
DateTimeAdd('1970-01-01',Field1/1000, 'Seconds')
Alteryx only stores dates to the nearest second so you need to keep that as a separate column.
Sample attached.
Hi @jdunkerley79 I have one query related to unix/epoch time conversion.
I'm using this formula to convert this unix/epoch time into normal date time format but it throwing an error -
Error - "Error: Formula (23): Parse Error at char(38): Formula: tried to apply numeric operator to string value (Expression #1)
"
Formula: DateTimeAdd('1970-01-01',[created_at]/1000, 'Seconds')
Can you please help me what wrong I'm doing here?
Thank you
User | Count |
---|---|
17 | |
15 | |
15 | |
8 | |
6 |