Jump to content

Archived

This topic is now archived and is closed to further replies.

Mateobus

Dates in PHP

Recommended Posts

I am trying to add 7 days to a date, is there a way to do this with the date function, or in a MySQL query with a date column. 

Share this post


Link to post
Share on other sites
[code]<?php
$dbdate  = '2006-07-06';

echo date ('Y-m-d', strtotime("+7 days $dbdate"));  //==> 2006-07-13

?>[/code]

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.