Calculation - TIME

Hi there,

Is there a way to calculate the difference in time? Example; if TIME 1= 8:30pm and TIME 2=10:00pm, I would like to have a computed field that will calculate the difference. In this case 1 1/2 hours. I looked in the help section and all i can see is @abs. Not too familiar with this. Any info is greatly appreciated.

Thanks,

Claire

Subject: Calculation - TIME

You just need to subtract one date from the other to get the difference in seconds.

If they’re just time fields (using calendar control) then the assumption would be the dates are the same day when the calculation is performed.

Dan

Subject: RE: Calculation - TIME

Thanks. That works, but anyway to do full hour and minutes instead of seconds?

Subject: RE: Calculation - TIME

You would take the seconds and divide by 60…This will then give you minutes…Divide that number by 60…This will then give you hours…

Subject: RE: Calculation - TIME

HI there,

I tried to do this … I have 3 hidden fields (hours; minutes; seconds) if TIME 1=10:00AM and TIME2=11:19AM,

hours field (divided/60) = 6.325833333333

minutes field (divided/60) = 379.55

seconds field = 22773

All based on TIME1 & TIME2

Subject: RE: Calculation - TIME

TIME1="10:00 AM"TIME2=“11:19 AM”

TIMEDIFF=TIME2 - TIME1

HOURS=@Round(TIMEDIFF / 60 / 60)

MINUTES=@Round(TIMEDIFF / 60) - (hours * 60)

= 1 HR 19 MN