cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Create a date column by adding milliseconds to previous date column

Hi there!

 

I am trying to convert some date data that is in a strange format e.g. /Date(1586417537437+0000)/) - i believe this is Microsoft .netJSON or something like that

 

Basically, the conversion can be done by adding a certain number of milliseconds to a benchmark date of 1/1/1970

 

I have the number of miliseconds, and I have the benchmark date, both in different columns. Can anyone advise how to add them to get a new date column?cap2.PNG

1 ACCEPTED SOLUTION
edhans
Super User
Super User

That is Unix Epoch time I believe, and that timestamp above is from April 9, 2020. You should ignore that +0000. Never convert Unix time with time zones. Always leave it at GMT, then convert it to your local time zone after you have converted it to the normal date/time in the GMT time zone. I explain this in my blog post where I show you how to handle this in Power Query. Let me know if you have any questions.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

View solution in original post

2 REPLIES 2
edhans
Super User
Super User

That is Unix Epoch time I believe, and that timestamp above is from April 9, 2020. You should ignore that +0000. Never convert Unix time with time zones. Always leave it at GMT, then convert it to your local time zone after you have converted it to the normal date/time in the GMT time zone. I explain this in my blog post where I show you how to handle this in Power Query. Let me know if you have any questions.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting
Anonymous
Not applicable

Many thanks - your article solved my problem!

Helpful resources

Announcements
PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Top Solution Authors
Top Kudoed Authors