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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Issues with Change type to Date

Hello Everyone - I was wondering if you could help me this issue. I have field with Date of Subcontract that comes Date/Time/Time Zone format, so I want to change it to Date format. But when I try to change it in Query edit,  for some reason it subtract a date.

For example 2/6/2017 12:00:00 AM, it become 2/5/2017. I don't know why exactly this happening, but I'll really apperciate it, if you could help me solve this problem. Thank you in advance.

 

DateTimeZone.PNG

 

DateFormat.PNG

1 ACCEPTED SOLUTION

Hi @Anonymous

 

First way: Change the data type to 'Date' in Data view.

Second way: Add the custom column to remove the TimeZone.Then change the type to 'Date'.

=DateTimeZone.RemoveZone([date])

1.png

Regards,

Cherie

 

 

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
tarunsingla
Solution Sage
Solution Sage

Greg_Deckler
Super User
Super User

Since your dates are midnight and your timezone is -6 it is subtracting 6 hours and hence previous day.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

Thank you for the quick reply, is there a way to fix that or go around it by creating like a column with just date?

Hi @Anonymous

 

First way: Change the data type to 'Date' in Data view.

Second way: Add the custom column to remove the TimeZone.Then change the type to 'Date'.

=DateTimeZone.RemoveZone([date])

1.png

Regards,

Cherie

 

 

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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