Forum Discussion

thmonte's avatar
thmonte
Helper IV
6 years ago
Solved

Converting MongoDB DateTime to Local DateTime

Hello All,

 

I have been using BI Connector + ODBC (It sucks) to connect to my MongoDB and the way dates are stored in my MongoDB instance is +4 or +5 hour offset depending on Daylight savings time.

 

For example, if a datetime is stored now:

  • 4/2/2020 12:00AM will be stored as 4/2/2020 4:00AM

 

Whats the best way to convert this to the correct 4/2/2020 12:00AM datetime?

 

I can try and do it in mySQL, PowerQuery, Dax.  I'm open to anything.