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
smcalister
Helper I
Helper I

Date Changes when Changing Column Type

I have a table that has a DepartureTime column presented in local.  I added a new column that converts this to UTC.  I then duplicated the column and changed the type to Date, but when I do, the Date reverts to the date of the local column.

 

Here's an example; Row 6:

 

Screen Shot 2022-08-08 at 15.14.38.png

Does anybody have any thoughts/solutions?

 

Thanks,

 

Seth

1 ACCEPTED SOLUTION
smcalister
Helper I
Helper I

I was able to solve this on my own by converting lcl to UTC and then removing the zone.  This allowed me to set the new column to Date without dates reverting to lcl.

View solution in original post

3 REPLIES 3
smcalister
Helper I
Helper I

I was able to solve this on my own by converting lcl to UTC and then removing the zone.  This allowed me to set the new column to Date without dates reverting to lcl.

smcalister
Helper I
Helper I

Unfortunately, while the column appears to be a Date column, it's still a DateTime and so when using that field, a record for each Time shows up.  Also, when connecting to another table in the Model view, the results are blank because the date column from my dates table doesn't have times so it will never match on DateTimeZone converted to Date in the presentation layer.

lbendlin
Super User
Super User

Keep the column types as DateTimeZone during the ETL.  Change the format only in the presentation layer (in the visuals)

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.