Results 1 to 2 of 2
  1. #1
    khughes46 is offline Competent Performer
    Windows 8 Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Grapevine, TX
    Posts
    231

    DateDiff giving same results for "w" and "ww" and both are the same.

    I am trying to count the number of weekdays between two dates using DateDiff: DateDiff("w",[EnrollmentDate],{WithdrawalDate]).


    I have an EnrollmentDate of 12/02/2014 and a WithdrawalDate of 12/04/2014. I am expecting a 2 and am getting a 0.
    In another I have dates of 08/25/2014 and 04/24/2015 and am getting 34; which obviously can't be right.
    What am I missing? Please guide me.

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    "w" parameter does not mean weekday, it means week and "ww" means calendar week.

    Counting the weekdays (excluding weekends and holidays) in a date range requires a custom function. Common topic in forum. Here is one https://www.accessforums.net/program...ecs-52457.html
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 09-03-2014, 03:27 AM
  2. Replies: 8
    Last Post: 07-15-2014, 05:56 PM
  3. Export "Query or Report" to a "Delimited Text File"
    By hawzmolly in forum Import/Export Data
    Replies: 3
    Last Post: 08-31-2012, 08:00 AM
  4. Replies: 11
    Last Post: 03-29-2012, 02:32 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums