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
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.
Anonymous
2 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/24
if 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
This is not a solution though if you are in a timezone that has daylight savings