+ Reply to Thread
Results 1 to 2 of 2

Increment month for Date type

Hybrid View

  1. #1
    Registered User
    Join Date
    05-05-2009
    Location
    San Diego, CA
    MS-Off Ver
    Excel 2003
    Posts
    97

    Increment month for Date type

    I have the following code:

     Dim curDate as Date
    I store a date value in curDate and want to increment the month of curDate by 1. How can I access the month only of 'curDate' ?

    I want to say something like:
    curDate.Month = curDate.Month + 1

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Increment month for Date type

    If you're saying you want to add 1 month to the date

    curDate = DateAdd("m",1,curDate)

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1