Hi All,
I have a column start time 09:00 am(hard coded),and another column with hours of the day I need to create a new end time which must add hours per day to 9 :00 am
I tried this DateTimeAdd("2016-03-30 09:00:00",tonumber([Hours per Day]),"hours" ) .
If [hours per day] is decimal hours e.g 4.5 then it does not work correctly.
Start time hours per day end time
9:00 4.5 13:30
9:00 4.0 13:00
9:00 2.0 11:00
Any help please.Thanks
Solved! Go to Solution.
@Learner_Kat One way of doing this
Hi, @Learner_Kat
Any fraction in the duration is truncated. For example, you cannot add "1.5 hours". Instead, add "90 minutes".
So, maybe you can use the formula:
DateTimeAdd("2016-03-30 09:00:00",tonumber([Hours]) * 60 ,"minutes" )
or 1 step by formula:
DateTimeFormat(DateTimeAdd("2016-03-30 09:00:00",tonumber([Hours]) * 60 ,"minutes" ),"%H:%M")
That works perfect.Thanks much
Hi, @Learner_Kat
If we can help you get your want, please mark it as a solution and give a like for more share.
User | Count |
---|---|
52 | |
27 | |
25 | |
24 | |
21 |