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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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