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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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