SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member Wasim Momin's Avatar
    Join Date
    Jul 2008
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to add seven days in current date using php

    Hi Guys,
    I want to add seven days to current date (format is ('Y-m-d-h-i-s')) and after getting the seven days later date from current date calculate some automatic operations each week on this date............


    Thanks in advance.........

    Wasim..........

  2. #2
    SitePoint Wizard siteguru's Avatar
    Join Date
    Oct 2002
    Location
    Scotland
    Posts
    3,629
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Code:
    <?php
    $rightnow = date('Y-m-d-h-i-s');
    $add7days = date('Y-m-d-h-i-s', strtotime('+7 days'));
    echo "$rightnow : $add7days";
    ?>
    Ian Anderson
    www.siteguru.co.uk


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
  •