Forum Discussion
arielcedola
6 years agoHelper III
Transforming values in column without creating new columns in M language
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 Th...
- 6 years ago
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]))))
camargos88
6 years agoCommunity Champion
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]))))
arielcedola
6 years agoHelper III
Exactly! I tried nesting the functions before but for some reason it didn't work. Now it did it perfectly.
Thanks .)