PDA

Click to See Complete Forum and Search --> : Differentiating Dates... !?!


cyberwarpy
Feb 18th, 2001, 10:26 PM
Ok, heres the problem:

I have a database that requires two dates (two different fields), for e.g:

Start Date (4/4/1983) to Stop Date (16/4/1983)

How do I find how many *Weekend* days there were during these two dates...? If you could answer this, you must be a true GURU.

Juriaan Borst
Feb 19th, 2001, 08:24 AM
I would run a macro; in excel you have the function weekday:

start = value(startdate)
end = value(enddate)

j = 0

for i = start to end

if weekday(i,1) = 6 or 7 then

j = j + 1

end if

next

jp_schwartz
Feb 19th, 2001, 04:59 PM
You have that function in visual basic too. If you need to access the data from a database, its better vb than excel.