Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Difference Between highest date & lowest date. 1

Status
Not open for further replies.

katrina63

Technical User
Aug 14, 2001
3
US
Can someone please tell me how to calculate the number of days between the beginning date & the ending date on a report? These are not seperate date fields.


15956 Doe, Jane 2/3/2006 10:30:00 AM 2:30:00 PM 04:00
15956 Doe, Jane 2/6/2006 7:00:00 AM 4:00:00 PM 09:00
15956 Doe, Jane 2/7/2006 7:00:00 AM 2:30:00 PM 07:30
15956 Doe, Jane 2/22/2006 11:30:00 AM 12:30:00 PM 01:00
15956 Doe, Jane 3/1/2006 12:30:00 PM 3:00:00 PM 02:30
Total Number of Pages:799 Number of Pages / Hour: 33.29 Totals Dept. Hours 24
 
Hi!

Use DateDiff:

DateDiff("d", LaterDate, EarlierDate)

this will return the number of days.

hth


Jeff Bridgham
Purdue University
Graduate School
Data Analyst
 
Set a control source in your footer (not Page Footer) to
=Max([DateField]) - Min([DateField])
or
=DateDiff("d",Min([DateField]), Max([DateField]))


Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top