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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
RobG123
Helper I
Helper I

Stop Powerbi converting date to date time and taking off 1 hour

Hi,

 

I have connected data from a sharepoint list into PowerBI. The dates in the sharepoint list are in date format, but when PowerBI ingests it converts them to date time. It also takes off 1 hour in some cases, I think this is related to daylight savings as it does this for dates from late March to end October. I think it might be trying to remove daylight saving from the dates in that period.

 

Does anyone know how I can stop PowerBI doing this? It means that some dates are different between the list and powerBI dashboard. 

 

Thanks
Rob

4 REPLIES 4
artemus
Microsoft Employee
Microsoft Employee

Oh, its already a datetime type. You could try adding a timezone to the datetime using DateTime.AddZone([Date], 0, 0) which would convert it to UTC.

Thanks, but this leaves times unaffacted. E.g. 07/10/2020 23:00, it converts to the same date time. In the source data in sharepoint this appears as 08/10/2020.

 

Just to point out I have many date fields that PowerBI is making this 'auto-correction' to, so ideally I would prevent it from doing that. Rather than transofrming every column individually in PowerBI. 

artemus
Microsoft Employee
Microsoft Employee

You can manually convert the value to datetime (which should avoid this issue) with:

[DateColumn] & #time(0, 0, 0)

Thanks for your response.

 

The code doesn't work because the field is already in Date Time format. PowerBI ingests as date time.

 

I can extract the date only from the date time column, but this gives me the day before the actual date as entered in sharepoint for March to October dates.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.