IanT
11-30-2001, 01:43 AM
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.
I have tried Datediff but with out success.
|
View Full Version : Difference between two dates IanT 11-30-2001, 01:43 AM 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. Harry 11-30-2001, 02:04 AM 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).] |