Results 1 to 4 of 4

Thread: Adding 1 month to a date

  1. #1

    Thread Starter
    Addicted Member mralston's Avatar
    Join Date
    Aug 2002
    Location
    Altrincham Nr Manchester, England
    Posts
    141

    Adding 1 month to a date

    I want to get the date 1 month from now. So if today is 11/11/2002, I want to get 11/12/2002. If today is 30/01/2003 I want to get (I suppose) 02/03/2003...something like that.
    In VBScript there is DateAdd(). Is there something similar in PHP?

  2. #2
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    Link this:

    Code:
    echo date('d/m/Y', strtotime('+1 month'));
    My evil laugh has a squeak in it.

    kristopherwilson.com

  3. #3

    Thread Starter
    Addicted Member mralston's Avatar
    Join Date
    Aug 2002
    Location
    Altrincham Nr Manchester, England
    Posts
    141
    Ta.

  4. #4
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    Originally posted by mralston
    Ta.
    Yes. Every movie should have T & A. I agree.
    My evil laugh has a squeak in it.

    kristopherwilson.com

Posting Permissions

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



Click Here to Expand Forum to Full Width