Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Hi,
I have this data coming in:
When I change the type to "Date", it shows me 11/18/2024 instead of 11/19/2024 ???
Solved! Go to 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.
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.
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.
I am in the Eastern Time Zone.
That would explain it.
What is your expected result? And why?
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.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!