Forum Discussion
Create a list from two timestamps in power query
- 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.
Hi Jennratten, Thank you for the code, is there a way to list hours
this list shows as 12/14/2024 10:00:00 AM
12/15/2024 11:00:00 AM
Insted how can i list same date and list hours
12/14/2024 10:00:00 AM
12/14/2024 11:00:00 AM
12/14/2024 12:00:00 PM....... 12/15/2024 1:00:00 PM
Please let me know if i can modify this code.
Hi jennratten , Thank you for the code, is there a way to list hours
this list shows as 12/14/2024 10:00:00 AM
12/15/2024 11:00:00 AM
Insted how can i list same date and list hours
12/14/2024 10:00:00 AM
12/14/2024 11:00:00 AM
12/14/2024 12:00:00 PM....... 12/15/2024 1:00:00 PM
Please let me know if i can modify this code.
- Anonymous2 years agoNot applicable
Hi arsm ,
jennratten Thanks for your reply!
arsm Just change the answer of jennratten 's into:= Table.AddColumn(#"Changed Type", "Custom", each List.DateTimes([Column1], Number.From([Column2]) ,#duration(0,1,0,0)))
Best Regards,
Dino Tao
If this post helps, then please consider Accept both of the answers as the solution to help the other members find it more quickly.- arsm2 years agoFrequent Visitor
Anonymous Thank you for replying
I was able to create a list but list wont stop at 12/15/2024 1:0:0 PM (column 2), it keeps going.
how can i end the list at column 2 timestamp
- Anonymous2 years agoNot applicable
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.