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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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