cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

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 November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.