Clock In / Clock Out (Military Time) equals negative time??

G

Guest

Time is entered in 15 minute increments of military time. I am using this:
Expr1: DateDiff("n",[Start],[End])/60

Works GREAT when your start time is "earlier" than your end time: 00:15 to
05:30 = 5.25 hours.

But I run into a snag when time is 14:00 to 00:00, this equals -14.00 hours.

How do I fix this aspect?
 
T

Tom Lake

Tracey said:
Time is entered in 15 minute increments of military time. I am using
this:
Expr1: DateDiff("n",[Start],[End])/60

Use a long date rather than just a time. Times alone can't
account for the rollover. start=14:00 and end=any time the
next day wouldn't work either.

Tom Lake
 
F

fredg

Time is entered in 15 minute increments of military time. I am using this:
Expr1: DateDiff("n",[Start],[End])/60

Works GREAT when your start time is "earlier" than your end time: 00:15 to
05:30 = 5.25 hours.

But I run into a snag when time is 14:00 to 00:00, this equals -14.00 hours.

How do I fix this aspect?

Include the date as well as the time in the fields.
 
R

raskew via AccessMonster.com

Hi -

Not sure where this came from, but it seems to work accross midnight:
Something to play with.

start = #14:00#
endi = #00:01#
? format(Start -1 -Endi, "Short Time")
10:01

Bob
Time is entered in 15 minute increments of military time. I am using this:
Expr1: DateDiff("n",[Start],[End])/60

Works GREAT when your start time is "earlier" than your end time: 00:15 to
05:30 = 5.25 hours.

But I run into a snag when time is 14:00 to 00:00, this equals -14.00 hours.

How do I fix this aspect?
 
G

Guest

Thank you!!! That did it!
--
"The only true wisdom is in knowing you know nothing." -Socrates


Tom Lake said:
Tracey said:
Time is entered in 15 minute increments of military time. I am using
this:
Expr1: DateDiff("n",[Start],[End])/60

Use a long date rather than just a time. Times alone can't
account for the rollover. start=14:00 and end=any time the
next day wouldn't work either.

Tom Lake
 
G

Guest

Thank you!!! That did it!
--
"The only true wisdom is in knowing you know nothing." -Socrates


fredg said:
Time is entered in 15 minute increments of military time. I am using this:
Expr1: DateDiff("n",[Start],[End])/60

Works GREAT when your start time is "earlier" than your end time: 00:15 to
05:30 = 5.25 hours.

But I run into a snag when time is 14:00 to 00:00, this equals -14.00 hours.

How do I fix this aspect?

Include the date as well as the time in the fields.
 
R

Ron

Don't forget that without a corresponding Date, this logic CANNOT
account for more than 23 hours and 59 minutes.

Ron
 

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