RE: [PHP] syntax for date math expressions
| From: | Rick Emery | Date: | Wed, 03 Apr 2002 19:01:51 +0000 |
| Subject: | RE: [PHP] syntax for date math expressions | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-91361@lists.php.net to get a copy of this message | ||
Convert to date/time variable and perform arithmetic.
Otherwise, if these dates are from mysql, let mysql do it
-----Original Message-----
From: ROBERT MCPEAK [mailto:RMCPEAK@jhuccp.org]
Sent: Wednesday, April 03, 2002 11:12 AM
To: php-general@lists.php.net
Subject: [PHP] syntax for date math expressions
What is the php syntax for adding or subtracting dates?
For example, I'd like to do something like this:
2002-04-03 - 2002-04-02 = 1
or
2002-04-03 - 2002-04-02 = 0000-00-01
or
2002-04-03 + 0000-00-01 = 2002-04-03
etc.
Can anybody help this newbie?
Thanks!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php