Calculating Dates

K

KRB

I have a table that I am using to calculate the number of absences for an
employee. Here is my formula that I am using:

=DateDiff("d",[JobStartDate],[JobEnddate])

this works great if the employee is absent for more than one day, but If the
Start date and EndDate are the same, it just displays a count of 0 instead of
one day. How can I have it to show that the employee was only absent 1 day.
Do I need to add the time fields into this query as well. Any help would be
great!!

Thanks in Advance
 
D

Duane Hookom

I would check your calcs again if you think this works "for more than one
day". Have you tried
=DateDiff("d",[JobStartDate],[JobEnddate])+1
 
K

KRB

You were right my other calculations where off as well, but the formula below
did fix my issue. Thanks!

Duane Hookom said:
I would check your calcs again if you think this works "for more than one
day". Have you tried
=DateDiff("d",[JobStartDate],[JobEnddate])+1
--
Duane Hookom
MS Access MVP

KRB said:
I have a table that I am using to calculate the number of absences for an
employee. Here is my formula that I am using:

=DateDiff("d",[JobStartDate],[JobEnddate])

this works great if the employee is absent for more than one day, but If
the
Start date and EndDate are the same, it just displays a count of 0 instead
of
one day. How can I have it to show that the employee was only absent 1
day.
Do I need to add the time fields into this query as well. Any help would
be
great!!

Thanks in Advance
 

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