If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
No.f days between dates, no w/e and Fridays
In have been using this formula to find the number of days between two dates,
not including weekends. txtNoOfDays = DateDiff("d", Date2, Date1) - (DateDiff("ww", Date2, Date1, 7) + DateDiff("ww", Date2, Date1, 1)) + 1 It works great, but now I need help with one that does not include Fridays. I need only the number of days in a month from Mon - Thurs. Thanks for your help. |
#2
|
|||
|
|||
No.f days between dates, no w/e and Fridays
Have you tried subtracting (DateDiff("ww", Date2, Date1, 6)?
-- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!) "Ricoy-Chicago" wrote in message ... In have been using this formula to find the number of days between two dates, not including weekends. txtNoOfDays = DateDiff("d", Date2, Date1) - (DateDiff("ww", Date2, Date1, 7) + DateDiff("ww", Date2, Date1, 1)) + 1 It works great, but now I need help with one that does not include Fridays. I need only the number of days in a month from Mon - Thurs. Thanks for your help. |
#3
|
|||
|
|||
No.f days between dates, no w/e and Fridays
Oops: unbalanced parentheses!
DateDiff("ww", Date2, Date1, 6) -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!) "Douglas J. Steele" wrote in message ... Have you tried subtracting (DateDiff("ww", Date2, Date1, 6)? -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!) "Ricoy-Chicago" wrote in message ... In have been using this formula to find the number of days between two dates, not including weekends. txtNoOfDays = DateDiff("d", Date2, Date1) - (DateDiff("ww", Date2, Date1, 7) + DateDiff("ww", Date2, Date1, 1)) + 1 It works great, but now I need help with one that does not include Fridays. I need only the number of days in a month from Mon - Thurs. Thanks for your help. |
Thread Tools | |
Display Modes | |
|
|