Forum Discussion
arsm
2 years agoFrequent Visitor
Create a list from two timestamps in power query
Hello, I'm trying to create a list from two timestamp columns in power query I have two columns with date and hour Column 1 Column 2 12/14/2023 10:00:0...
- Anonymous2 years ago
Hi arsm ,
Please change the M function into this:Table.AddColumn(#"Changed Type", "Custom.1", each List.DateTimes([Column1], Duration.TotalHours([Column2] - [Column1]) + 1 ,#duration(0,1,0,0)))
Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
jennratten
Super User
2 years agoHi arsm - this is how you can do it.
Table.AddColumn(#"Changed Type", "Duration", each List.DateTimes([Column1], Number.From([Column2]) ,#duration(1,1,0,0)))