cancel
Showing results for 
Search instead for 
Did you mean: 
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 🙂

Proud to be a Super User!

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 🙂

Proud to be a Super User!

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
Exciting changes

Power BI Community Changes

Check out the changes to the Power BI Community announced at Build.

May 2023 update

Power BI May 2023 Update

Find out more about the May 2023 update.

Kudo Data Story carousel

Data Stories Gallery

Visit our Data Stories Gallery and give kudos to your favorite Data Stories.

Top Solution Authors