Calculate the difference between two Time controls
I am create a time off request eForm application with a "Start" and "End" Time controls. I'd like the form to auto-calculate the difference in hours between the times but haven't been able to get this to work.
I tried using a Formula control and this formula:
datediff('hour',${StartTime},${EndTime})
Any suggestions? TIA!
-
Cindy,
I used Date Time form control and tested your formula. It is given me hours properly but value was 0.0002 hours so I just added round off function to keep it pretty and here are the results.
round(datediff('hour', ${StartTime}, ${EndTime}))
When difference is less than 0 hours

when more that zero hours

note: My Environment is having latest AgilePoint version.
Regards,
Harish
-
Hi Harish,
Could you tell me what number is your AgilePoint version?
My AgilePoint version is NX v8.0 SU2.3
I try to used Date Time form control and tested your formula.
It can't work.
I was wondering if you have any special settings.
I only set formula with round(datediff('hour', ${DateTime1}, ${DateTime2}))


Regards,
David
请先登录再写评论。
评论
2 条评论