SOLVED
Convert Mongo DB Dates
Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Link86
8 - Asteroid
‎02-02-2022
11:28 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
Solved! Go to Solution.
Labels:
- Labels:
- Date Time
1 REPLY 1
SoccerTil
8 - Asteroid
‎02-02-2022
12:26 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
