Forum Discussion
Convert Datetimeoffset to Datetime in Directquery
- 7 years ago
Hi Anonymous
Are you saying that you have the text UTC inside your transaction date?
If it looks similar to this, you can transform the column and extract text before delimiter and then change it's type to datetime. - 7 years ago
Hi Anonymous ,
By my test, the type of Datetimeoffset is shown as the type of Date/Time/Zone in Power Query. When apply and close the query, the column will show Date/Time automatically. I could create formulas to get year, month and day.
- Calculated columns
Year = YEAR(Table_4[Time]) Month = MONTH(Table_4[Time]) Year = YEAR('Table_4 (2)'[Time])- Measures
Year = YEAR(MAX('Table_4 (2)'[Time])) Month = MONTH(MAX('Table_4 (2)'[Time])) Day = DAY(MAX('Table_4 (2)'[Time]))If it still don't work, can you please post a dummy file or screenshots?
Best Regards,
Xue
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Anonymous ,
By my test, the type of Datetimeoffset is shown as the type of Date/Time/Zone in Power Query. When apply and close the query, the column will show Date/Time automatically. I could create formulas to get year, month and day.
- Calculated columns
Year = YEAR(Table_4[Time])
Month = MONTH(Table_4[Time])
Year = YEAR('Table_4 (2)'[Time])- Measures
Year = YEAR(MAX('Table_4 (2)'[Time]))
Month = MONTH(MAX('Table_4 (2)'[Time]))
Day = DAY(MAX('Table_4 (2)'[Time]))If it still don't work, can you please post a dummy file or screenshots?
Best Regards,
Xue
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.