Re: [PHP-DB] Pulling Date from MySQL then subtract

2005-01-22 Thread John Holmes
Jess Hunter wrote: 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. SELECT yourdatecolumn - INTERVAL 30 DAY FROM yourtable WHERE ... -- ---Joh

RE: [PHP-DB] Pulling Date from MySQL then subtract

2005-01-22 Thread Bastien Koert
you can use date-sub in the sql command (see the mysql manual) or use mktime() function in php bastien 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 date