Day function to remove weekend dates?

Discussion in 'MS Access' started by FunkyAnt13, Jul 28, 2008.

  1. FunkyAnt13

    FunkyAnt13 New Member

    Joined:
    Jul 28, 2008
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    I have been asked to prevent dates that fall on the weekend from being inputted into the database, however i have no idea how to do this?

    can anyone help?

    thanks
     
  2. apr pillai

    apr pillai New Member

    Joined:
    Dec 17, 2010
    Messages:
    16
    Likes Received:
    12
    Trophy Points:
    0
    Occupation:
    Auditor
    Location:
    India
    Home Page:
    http://www.msaccesstips.com/
    Use the WeekDay() Function to find out the weekend day.

    ? WeekDate(Cdate("18/12/2010")
    Result: 7
    if the result is seven then it is weekend day. (Sun=1, Mon=2,Tue ......Sat=7)
     
  3. apr pillai

    apr pillai New Member

    Joined:
    Dec 17, 2010
    Messages:
    16
    Likes Received:
    12
    Trophy Points:
    0
    Occupation:
    Auditor
    Location:
    India
    Home Page:
    http://www.msaccesstips.com/
    Correction:

    ? WeekDay(Cdate("18/12/2010"))
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice