in PHP, coming out in yyy-mm-dd

date("Y-m-d", mktime(0,0,0, date("m"), date("d")+14, date("Y"));

untested, so please test it - this will ignore hours, minutes, seconds (the
leading 3 0's) and make a timestamp using mktime for this month, this day +
14, this year, then return it formatted as yyy-mm-dd

HTH

Beau



// -----Original Message-----
// From: Ben S. [mailto:[EMAIL PROTECTED]]
// Sent: Tuesday, 13 November 2001 1:49 PM
// To: [EMAIL PROTECTED]
// Subject: [PHP-DB] Date Calculation
// 
// 
// How do you get the date that is 14 days from today's date?
// I can get that date with mysql monitor but PHP. I am using 
// PHP4 and MySQL. I
// have tried many things but nothing works.
// Does anyone give me a help?
// 
// Thank you.
// Ben
// 
// 
// 
// -- 
// PHP Database Mailing List (http://www.php.net/)
// To unsubscribe, e-mail: [EMAIL PROTECTED]
// For additional commands, e-mail: [EMAIL PROTECTED]
// To contact the list administrators, e-mail: 
// [EMAIL PROTECTED]
// 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to