"Short time" format and duration

G

Guest

Hi all,

I have a start time (HH:MM), a duration (decimal) and a finish time

Finish: DateAdd("h",[duration],[TrainingTime])

Eg If the start time is 13:00, the duration is 1.5 the finish time comes up
as 14:00.

How can I correct the finish time?

Cheers
 
P

Pieter Wijnen

one seccond is 1/360 of an Hour
one minute is 1/60 of an hour
one hour is 1/24 of a Day
thus simple math gives

Trainingtime + (1.5/24) = EndTime

HTH

Pieter
 
G

Guest

I didn't think of it like that.

cheers



Pieter Wijnen said:
one seccond is 1/360 of an Hour
one minute is 1/60 of an hour
one hour is 1/24 of a Day
thus simple math gives

Trainingtime + (1.5/24) = EndTime

HTH

Pieter

scubadiver said:
Hi all,

I have a start time (HH:MM), a duration (decimal) and a finish time

Finish: DateAdd("h",[duration],[TrainingTime])

Eg If the start time is 13:00, the duration is 1.5 the finish time comes
up
as 14:00.

How can I correct the finish time?

Cheers
 
J

John Spencer

Add minutes (or seconds) instead of hours

For minutes use
DateAdd("n",[Duration] * 60,[TrainingTime])

For seconds use
DateAdd("s",[Duration] * 60 * 60,[TrainingTime])

--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top