Results 1 to 3 of 3
  1. #1
    Star Lounger
    Join Date
    Feb 2003
    Posts
    60
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Query Cal - Add 1 month to Date Value (2000)

    I am trying to add 1 month to a date field in a query that I am running. The format of the query field is mmm-yy, so 1/17/05 = Jan-05; however, I'd like it return Fed-05.

    Field: Analysis Month: VAL_DATE

    Thanks for any help provided.

    Scott

  2. #2
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,624
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Query Cal - Add 1 month to Date Value (2000)

    The simplest way to do that is to use the DateAdd() function. You can read more about its use and capability in the VBA Help, but to do what you want it would look like this:

    <font color=blue><font face="Georgia">DateAdd("m",1,MyDate)</font face=georgia></font color=blue>.

    VBA help contains a very similar example with a string date - note that you can use many VBA functions in queries, and this and the Format() function are both in that category.
    Wendell

  3. #3
    Star Lounger
    Join Date
    Feb 2003
    Posts
    60
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Query Cal - Add 1 month to Date Value (2000)

    Thanks Wendell. It worked great!

Posting Permissions

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