Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hi,
I'm using m language to perform the following convertions of datetime data:
1) unix timestamp to utc date time zone
2) utc date time zone to local time zone
3) local time zone to datetime
The query I'm using is the following:
let
....
#"unix to utc" = Table.AddColumn(#"previous step", "timestamp_utc", each #datetimezone(1970,1,1,0,0,0,0,0) + #duration(0,0,0,[data])),
#"utc to local" = Table.AddColumn(#"unix to utc", "timestamp_local", each DateTimeZone.ToLocal([timestamp_utc])),
#"to datetime" = Table.AddColumn(#"utc to local", "timestamp", each DateTime.From([timestamp_local]))
in
#"to datetime"
Unix datetime data is in the column [data] of my table.
Every step in the query introduces a new column: timestamp_utc, timestamp_local and timestamp. My question is, how can I perform the same functions and get the same result as in the last column timestamp, but without introducing the intermediate columns timestamp_utc and timestamp_local?
Thanks .)
Solved! Go to Solution.
Hi @arielcedola ,
Try nesting the functions:
Table.AddColumn(#"previous step", "timestamp_utc", each DateTime.From(DateTimeZone.ToLocal(#datetimezone(1970,1,1,0,0,0,0,0) + #duration(0,0,0,[data]))))
Hi @arielcedola ,
Try nesting the functions:
Table.AddColumn(#"previous step", "timestamp_utc", each DateTime.From(DateTimeZone.ToLocal(#datetimezone(1970,1,1,0,0,0,0,0) + #duration(0,0,0,[data]))))
Exactly! I tried nesting the functions before but for some reason it didn't work. Now it did it perfectly.
Thanks .)
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.