Results 1 to 4 of 4
  1. #1
    ezybusy is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Nov 2015
    Posts
    119

    How to check if we are at the first day of the current month.

    Hi guys
    I would like to know how i can do the followings:
    > How i can check if we are at the first day of the current month?
    > And how to check if the that first day is not Sunday.



    I came across the following:
    Code:
    DateSerial(year(Date), month(Date), 1)
    but it doesn't do the job.

    Thanks

  2. #2
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,412
    use day(date())

    and for day of week use the weekday function

    weekday(date())

    Sunday=1

  3. #3
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,722
    To determine if the first day of the current month is a Sunday
    ?iif(weekdayName(day(DateSerial(year(date), Month(Date), 1))) = "Sunday","yes Sunday","not Sunday")
    yes Sunday

  4. #4
    ezybusy is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Nov 2015
    Posts
    119
    Perfect. Works like a charm. Thx a lot

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

Similar Threads

  1. How many Thursdays in current month
    By tbjmobile@gmail.com in forum Access
    Replies: 31
    Last Post: 03-13-2018, 05:22 AM
  2. Replies: 2
    Last Post: 02-12-2015, 05:14 AM
  3. Get first day and month of current year
    By Ruegen in forum Programming
    Replies: 3
    Last Post: 12-01-2014, 06:45 PM
  4. Replies: 6
    Last Post: 05-05-2014, 10:51 PM
  5. Current month in a field as default
    By leandrosarno in forum Access
    Replies: 6
    Last Post: 02-09-2010, 05:40 AM

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