Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors