dmorgan20
dmorgan20

Reputation: 363

calculate number of days between dates

I need to calculate the number of dates between dates in my table

I have two columns named DateStarted & DateReturned

I need to calculate the number of days between ALL of the records

This is what I have

=DateDiff("d",Date(),[DueDate]) 

But how do I get it to do this for every single record and tell me the total number of days.

Upvotes: 0

Views: 2987

Answers (1)

Darren Bartrup-Cook
Darren Bartrup-Cook

Reputation: 19767

Create a query based on your table that calculates the difference:

SELECT  DateStarted, 
        DateReturned, 
        DateDiff("d",DateStarted,DateReturned) As NumberOfDays
FROM    Table1

This will return a table something like:

Initial table, Query & Results

Upvotes: 1

Related Questions