We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Convert Mongo DB Dates

Link86
8 - Asteroid

Hello, I am using the Alteryx API to get the last run date for workflows on the gallery. However, the date that I am being provided is /Date(1643792417000-0500)/. I am not sure how to convert this. Any help would be great. Thank you.

1 REPLY 1
SoccerTil
8 - Asteroid

I am not a MongoDB expert, but all databases like to store dates as integers. From what I can tell by looking at some MongoDB reference documents, this formula should work for the date integer [the value before the '-']. In this formula field [a] is the value you provided.

 

DateTimeAdd('1970-01-01',[a]/1000,'seconds')

 

This returns 2022-02-02 as the date.

Labels
Top Solution Authors