Forum Discussion
How to add hours to DateTime data?
- 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.
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.
- jorgeaguirre9 years agoFrequent Visitor
THIS FUNCTION IS AVAILABLE BY direct query?????
I have this error
- malagari9 years agoContinued Contributor
Not trying to resurrect a dead topic, but for those wondering where #duration is.. it's in PowerQuery (M), not DAX.
- zamboni11997 years agoHelper II
thanks you just helped me too!!
- kaka9 years agoHelper II
I tried this to type the function #duration function but it's not coming up. Power Bi does not recognize it. Do you know why?
- rtrenado9 years agoRegular Visitor
Same here.. that #Duration formula doesn't works
- MarcelBeug9 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.
- Anonymous2 years agoNot applicable
The #Duration function seems to be related to something else now.
I found the easiest way was to create a new column using the following formula:Modified = [modifiedon]+ 11/24if you say + 11 that adds 11 days. So to add 11 hours, simply divide by 24
This is not a solution though if you are in a timezone that has daylight savings