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
tex628
Community Champion
Community Champion

Date serial to date format

Hello, 

Im having an issue, i have a large dataset where the dates currently have the excel serial format. Is it possible to format this column to proper dateformat, perferably in the query?

 

It might also be relevant to say that the sourcefile is a .txt

 

Serial format/ Normal formatSerial format/ Normal format

 

Br,

Johannes


Connect on LinkedIn
2 ACCEPTED SOLUTIONS
Sean
Community Champion
Community Champion

In the Query Editor right click the Serial Date column header and Change Data Type to Date.

View solution in original post

Stachu
Community Champion
Community Champion

in Excel 1st date is 01-01-1900, so you could just add nr of days since then
e.g. use this code for new column

#date(1900,1,1)+#duration([Serial Date]-2,0,0,0)

EDIT Sean's answer is way simpler, I'd go with it 



Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

View solution in original post

3 REPLIES 3
Stachu
Community Champion
Community Champion

in Excel 1st date is 01-01-1900, so you could just add nr of days since then
e.g. use this code for new column

#date(1900,1,1)+#duration([Serial Date]-2,0,0,0)

EDIT Sean's answer is way simpler, I'd go with it 



Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

tex628
Community Champion
Community Champion

Both ways work, i managed to figure out ur proposed way before i had a chance to read the responses her 😛 

Thanks for the assistance,

 

J


Connect on LinkedIn
Sean
Community Champion
Community Champion

In the Query Editor right click the Serial Date column header and Change Data Type to Date.

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.