you can use date-sub in the sql command (see the mysql manual) or use mktime() function in php


From: "Jess Hunter" <[EMAIL PROTECTED]>
To: <>
Subject: [PHP-DB] Pulling Date from MySQL then subtract
Date: Sat, 22 Jan 2005 08:37:56 -0600

I am needing some clarification on doing math with dates pulled from MySQL.
The date format in the database is YYY-MM-DD and what I want to do is pull
the date out, then add/subtract 30 days from the date.

I have read through the manual, but for some reason, I'm just not getting

Any help and/or examples would be greatly appreciated.

Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (
Version: 6.0.832 / Virus Database: 566 - Release Date: 1/10/2005

PHP Database Mailing List (
To unsubscribe, visit:

-- PHP Database Mailing List ( To unsubscribe, visit:

Reply via email to