Results 1 to 3 of 3
  1. #1
    Join Date
    May 2005
    Posts
    14

    Unanswered: 5 Day Work Week...

    Good morning. Does anyone know how to use dates that are only M-F? I have a date field that needs to only count 5 day work weeks, not 7 days. If the date falls over the weekend, then do not count it. The fields are Actual Ship date and Actual Due Date. I take the difference between the two to get teh variance, but if teh date falls on a Saturday or Sunday, then do not count it. Any help would be great!! Thanks!!

  2. #2
    Join Date
    Nov 2004
    Posts
    4
    Try the following:

    NumberVar DaysDiff := DateDiff("d",{DATABASE.RAISED_DATETIME},{CurrentDa te}) -
    DateDiff("ww",{DATABASE.RAISED_DATETIME},{CurrentD ate},crsaturday) -
    DateDiff("ww",{DATABASE.RAISED_DATETIME},{CurrentD ate},crsunday);

  3. #3
    Join Date
    Nov 2004
    Posts
    4
    sorry, you should adjust the CurrentDate field to be the fileds you require i.e. Actual Ship date - Actual Due Date
    Last edited by StewartLloyds; 10-17-06 at 12:04.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •