Forum Discussion
Anonymous
9 years agoNot applicable
How to add hours to DateTime data?
I have a column DateTimeCreated (Example: 2016-12-20 19:40) and I want to add 10 hours to this resulting in 2016-12-21 05:40. Is this possible?
- 9 years ago
You can add a duration to a datetime field, e.g. if your fieldname is "DateTime":
[DateTime] + #duration(0,10,0,0))
The arguments of#duration are days, hours, minutes, seconds.
MarcelBeug
9 years agoCommunity Champion
#duration is a Power Query (M) function to be used in the Query Editor.
And it is case-sensitive, so #Duration won't work in any case.
DavePx
4 years agoFrequent Visitor
Worth mentioning in the answer as Power Query M is not mentioned in the question either.
This is first Google result for "powerbi date add hours".
Most people would be expecting DAX