How do I use DATEDIFF to count only working days?

F

Fabio

Hey Guys,

Can some one help with this issue? I´m trying to get two dates and
subtract them to get the number of days between them. But I´m not able
to do it for the working days only. It is including saturdays and
sundays.

I´m using something like * DateDiff("d",[Start],[Finish]) * .

I´ve read somewhere tha if I use a "ww" instead of "d" it would work,
but it didn´t.

Hope some one can giveme some directions.

Thanks guys...

P.S.: Sorry about my bad english, I´m from Brazil.
 
G

Gérard Ducouret

Fabio,

Instead of DateDiff, use ProjDateDiff which will take into a account a
calendar

Gérard Ducouret

PS : I'm from France ;-)
 
J

Jim Aksel

And both of your written English is much better than many people here in Los
Angeles.
 
F

Fabio

First of all, Thanks Gerard for helping me with this issue. I use
projdatediff but it returns the difference in minutes. But that wa
easy solve, I just had to divide for 480. Thank you ! ! !

And Jim, thanks for the complement
 
B

Bob

First of all, Thanks Gerard for helping me with this issue. I used
projdatediff but it returns the difference in minutes. But that was
easy solve, I just had to divide for 480. Thank you ! ! !

And Jim, thanks for the complement.

--
Fabio
------------------------------------------------------------------------
Fabio's Profile:http://forums.techarena.in/member.php?userid=39414
View this thread:http://forums.techarena.in/showthread.php?t=890901

http://forums.techarena.in

Hi,

Just to be on the safe side, divide by [Minutes per Day].
This takes into account any changes to the length of a day...
Cuts down on formula maintenance.

Cheers,

Bob
 
T

Tony King

Hi Fabio

Try this formula. If you use a Number field then you must have a number as an output, i.e. "1" or "2". If you use a Text field then you can have, for example, "Red" or "Green" as the output.

For a Number field:
IIf(DateDiff("d",[Current Date],[Start])<8,1,2)

For a Text field:
IIf(DateDiff("d",[Current Date],[Start])<8,"Red","Green")

Hope this helps.

Kind regards

Tony
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top