Results 1 to 3 of 3
  1. #1
    nggman is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Oct 2017
    Posts
    27

    DateAdd

    I need to use DateAdd to go back 1 month. I only want the result to be YYYYMM though. For example, today is 9/6/2018. I would want my result to be 201808. I have tried this but it does not work. Any help is appreciated. This is for an Access query. Thank you.


    DateAdd("m", -1, "201809")

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Format(DateAdd("m", -1, Date()), "yyyymm")
    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.

  3. #3
    nggman is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Oct 2017
    Posts
    27
    Thank you!!!!!!!!!

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

Similar Threads

  1. DateAdd
    By Burnsie in forum Access
    Replies: 5
    Last Post: 01-29-2018, 08:02 AM
  2. DateAdd
    By Bentley in forum Queries
    Replies: 3
    Last Post: 01-23-2017, 05:20 PM
  3. the DateAdd
    By azhar2006 in forum Queries
    Replies: 1
    Last Post: 04-20-2014, 03:18 PM
  4. DateAdd()
    By cbrsix in forum Programming
    Replies: 3
    Last Post: 11-22-2011, 02:20 PM
  5. dateadd help
    By dubsdj in forum Queries
    Replies: 3
    Last Post: 03-03-2011, 07:22 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