Forum Discussion

MXXIV's avatar
MXXIV
Regular Visitor
3 years ago
Solved

How to convert a column from number to Duration in Direct Query, without switching to import mode?

I have been trying to convert a UNIX timestamp to datetime in Power Query. I am using Direct Query, not Import.   I am very surprised that this is so difficult. I keep getting this error:   This ...
  • AmiraBedh's avatar
    3 years ago

     

    You can try to convert the column from number to duration format in DirectQuery mode by using UTCDateTime and DateTimeZone  : Datetime = DateTimeZone(UTCDateTime(1970, 1, 1, 0, 0, [UnixTimestampColumn]), "UTC")