RE: [PHP-DB] Date Calculation
| From: | Rick Emery | Date: | Tue, 13 Nov 2001 14:01:00 +0000 |
| Subject: | RE: [PHP-DB] Date Calculation | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-14282@lists.php.net to get a copy of this message | ||
Since you mentioned MYSQL, I'm assuming you have some sort of database query
in mind. For instance, finding dates in a date field in a table in which 14
days from that field date is significant.
For instance, the following locates records whose records contain date
fields less than 14 days from today:
SELECT * FROM mytable WHERE mydate < DATE_ADD(now(), INTERVAL 14 DAY);
-----Original Message-----
From: Ben S. [mailto:sehara@hotmail.com]
Sent: Monday, November 12, 2001 11:49 PM
To: php-db@lists.php.net
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: php-db-unsubscribe@lists.php.net
For additional commands, e-mail: php-db-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net