Results 1 to 3 of 3
  1. #1
    greggue is offline Novice
    Windows XP Access 2007
    Join Date
    Aug 2010
    Posts
    12

    Datediff

    I created a query that calculates the total number of registrations per week.
    I used the dateddiff function to count the number of week from certain date to the registration date.

    The issue is that if there is NO registration during a week, the datediff function do not show the week

    Total Registrations Week
    2 6
    5 5


    4 3
    4 2
    1 1

    I want to show that is if there is no registration on week 4 it will still show week 4, but with 0.

  2. #2
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    try preceeding the date function with either the NZ function or the IIF() function.

  3. #3
    William McKinley is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jul 2010
    Posts
    59
    I had this same issue. I used the NZ() function and it worked great. Try doing NZ([Registrations Field],0)

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

Similar Threads

  1. Convert date format yyyymmdd for datediff
    By TEN in forum Programming
    Replies: 1
    Last Post: 06-17-2009, 09:35 PM
  2. Building a Difficult DateDiff Expression
    By jma108 in forum Queries
    Replies: 0
    Last Post: 06-15-2009, 12:39 PM
  3. Change Between by DateDiff or DateAdd.
    By wagner.bts in forum Queries
    Replies: 1
    Last Post: 06-05-2009, 11:24 AM
  4. DateDiff function
    By Scott R in forum Reports
    Replies: 5
    Last Post: 12-03-2008, 07:32 AM
  5. Datediff() help needed
    By geoff44 in forum Access
    Replies: 2
    Last Post: 11-20-2008, 04:44 PM

Tags for this Thread

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