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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
EaglesTony
Post Prodigy
Post Prodigy

Changing type to date is causing date to go to next day

Hi,

 

  I have this data coming in:

EaglesTony_0-1731074781937.png

 

  When I change the type to "Date", it shows me 11/18/2024 instead of 11/19/2024 ???

EaglesTony_1-1731074847998.png

 

1 ACCEPTED SOLUTION

Looking at it another way, it DOES take into account your region settings. The original is of type datetimezone and the +00:00 indicates it is UTC. When you convert it to type date, it changes it to the date in your local timezone. For END_DATE that happens to be the previous day. 

 

How to handle this depends on what you are trying to accomplish. If you want to keep the Date part the same as if you were using UTC, then you can remove the timezone information.

View solution in original post

10 REPLIES 10
Omid_Motamedise
Super User
Super User

it is because of time zoon. your value is in time zoon + 00:00 and when you convert it into date your time zoon will be added into it.


If my answer helped solve your issue, please consider marking it as the accepted solution. It helps others in the community find answers faster—and keeps the community growing stronger!
You can also check out my YouTube channel for tutorials, tips, and real-world solutions in Power Query with the following link
https://youtube.com/@omidbi?si=96Bo-ZsSwOx0Z36h
EaglesTony
Post Prodigy
Post Prodigy

Keep it UTC how ?...This data is coming from another system...is there a way I could adjust it back 5 hours ?

Yes, Power Query offers functions to add, remove, or change timezones. 

 

Converting a datetimezone to date will recalculate the date.  Removing the timezone first will not recalculate the date.

 

You can choose which way to do this.

EaglesTony
Post Prodigy
Post Prodigy

I am in the Eastern Time Zone.

That would explain it.

 

What is your expected result? And why?

lbendlin
Super User
Super User

You seem to live in a timezone west of Greenwich? (But not that much, less than 20 hrs)

So your saying, since I am 5 hours behind, PowerBI doesn't take into account my region settings(EST) and changes it back 5 hours (in this case would be 11/18/2024 11pm, I assume) ?

Looking at it another way, it DOES take into account your region settings. The original is of type datetimezone and the +00:00 indicates it is UTC. When you convert it to type date, it changes it to the date in your local timezone. For END_DATE that happens to be the previous day. 

 

How to handle this depends on what you are trying to accomplish. If you want to keep the Date part the same as if you were using UTC, then you can remove the timezone information.

Yes, I just want to keep the date part.

 

This is the solution:

 

1) First remove the timezone using DateTimeZone.RemoveZone 

2) Convert it to a Date 

correct.  Stuff like this is the main reason why everything should be kept in UTC.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors