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

The FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register now

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.
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
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.