Difference between two dates

IanT

Registered User.
Local time
Today, 04:54
Joined
Nov 30, 2001
Messages
191
I want to show the differnce between two dates in a query, but not count weekend dates ie 30-11-01 to 3-12-01 is two days.
I have tried Datediff but with out success.
 
Write your own function.

Function CountDays(StartDate,EndDate)
Loop through checking each day.
If Weekday(date) between 2 and 6 then Total = Total + 1
Next day etc

Then in your query have a column which is:
Days: CountDays(Start field, End field)


HTH


[This message has been edited by Harry (edited 11-30-2001).]
 

Users who are viewing this thread

Back
Top Bottom