Skip to main content

Our date data is stored in JSON in the following format.

 

_createdOn:2018-09-19 03:29:27.165

 

I'm using Mongo DB Compass to export the data and when it comes over, I see this in the JSON.

 

"createdOn":{"$date":{"$numberLong":"1548437882464"}}}

 

I'm assuming I need to make a calculated field to transform the data?

If this is the case, are there any resources on how to translate this into something usable like the UTC dates in the original JSON.

14 answers
  1. Jan 31, 2019, 4:54 PM

    If I remember correctly, MongoDB's default date storage is as an Epoch Timestamp (miliseconds since 01/01/1970), so to convert that to a date in Tableau, you'd create a calculated field like this:

     

    DATEADD('second', [Date Long]/1000, ⌗1970-01-01#)

0/9000