Quick Search:
 
 PHP Code: Add and Subtract dates Jump to:  
Category: >> PHP Code >> Add and Subtract dates  

<< lastnext >>

Snippet Name: Add and Subtract dates

Description: You can combine strtotime with the date function to create your own date. This is just an alternative to using mktime that's a little more intuitive.

Also see:
» Convert UK Dates To mySQL Format Dates
» Delete files older than 'X'
» String to Date
» Month, Day, Year dropdown boxes
» Calculate date of Easter Sunday
» Define a schedule of holidays
» Calendar for any month any year
» Basic PHP Calendar
» Convert Standard time to 24-hour time ...
» What Season Is It?
» Delete by date
» Days in month #2
» Days in month one
» Count days between dates
» Find days between dates one
» Build Date Select Boxes

Comment: (none)

Language: PHP
Highlight Mode: PHP
Last Modified: March 16th, 2009

<?PHP
 
$date = DATE('Y-m-d', STRTOTIME("-30 days"));
$date = DATE('Y-m-d', STRTOTIME("-10 years"));
$date = DATE('Y-m-d', STRTOTIME("+30 days"));
 
?>


 
   Home |    Search |    Code Library |    Sponsors |    Privacy |    Terms of Use |    Contact Us © 2003 - 2024 psoug.org