Results 1 to 5 of 5
  1. #1
    bbbeng is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Dec 2011
    Posts
    8

    calculate first day of next month in following year

    I have tried to do this using DateAdd but I cant get it to add both the month and year. Sorry if I am missing something obvious.



    I have a date field [HireDate] and I need to add one year then get then get the first day of the next month.

    For example: HireDate = 1/15/2012 - I need access to return 2/1/2013.

    Can anyone make a suggestion regarding how to build that expression? Thanks!

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    How about DateSerial(Year(HireDate)+1,IIF( Month(HireDate) = 12,1,Month(HireDate)+1,1)

  3. #3
    bbbeng is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Dec 2011
    Posts
    8
    Just the tip I needed - thank you!

    I used DateSerial(Year([Hire_Date])+1,Month([Hire_Date])+1,1) and it returns just what I needed.

  4. #4
    bbbeng is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Dec 2011
    Posts
    8
    oops - you are right , I need to account for the december hire dates.

  5. #5
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Glad we could help.

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

Similar Threads

  1. month year date
    By slimjen in forum Database Design
    Replies: 6
    Last Post: 04-17-2012, 01:02 PM
  2. Sum by Won Project in by each month of the year
    By 011billyw in forum Reports
    Replies: 11
    Last Post: 03-22-2012, 04:09 PM
  3. Sorting by month and day - without year
    By TracyBell in forum Access
    Replies: 3
    Last Post: 11-17-2011, 10:29 AM
  4. default month and year
    By beefyalby in forum Forms
    Replies: 3
    Last Post: 12-05-2010, 11:40 PM
  5. by year by month
    By nkuebelbeck in forum Reports
    Replies: 21
    Last Post: 03-24-2010, 01:53 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