DateDiff - WorkDays only

thenoisydrum

Registered User.
Local time
Today, 06:28
Joined
Jul 26, 2012
Messages
52
Hello,
I am trying to deploy the datediff function to return the number of working days between 2 dates. Nice and simple so far, I want to exclude Saturdays and Sundays.
I have a Call Log Date and Date of Contact and I would like to return the number of working days between the 2.

If I use the "d" interval it does as it says on the tin. That's a good starting point.
However, if I use the "w" interval it starts being naughty.
It seems to return the number of weeks. I thought that "ww" was the week interval?

I've done a lot of searching on the net and I can find lots of functions that are supposed to carry out what I am after but nothing specifically addressing why this does not work.

Am I missing something?

Here is my query;
Working Days: DateDiff("w",[call log date],[date of contact])

From my table, I can give the example of Call Log Date is 17/10/2016 and Date of Contact is 25/10/2016. My query returns 1. I would like it to return 6.

Can anybody help please?

Many thanks

'Drum

PS. The ultimate aim is to be able to say that if the date of contact is more than one day after the call log date then I want to return a value of 2 and if it is within 1 day then return a value of 1.
As call logs only go out Monday to Friday I need to exclude Saturday and Sunday
 
Scrool down to Similar Threads - there are some sample coding in them.
 
Thanks for the heads up but I can't really find a simple solution.

I have decided to approach this a different way and say that if the call log day is a Friday and the difference between date of contact and the call log date is greater than 3 then it is late (return a value of 2) and if the call log day is between a Monday and a Thursday and the difference between the date of contact and the call log date is greater than 1, then it is late (return a value of 2), otherwise it is on time (return a value of 1)
 

Users who are viewing this thread

Back
Top Bottom