RE: [PHP-WIN] Date Math
| From: | Charles P. Killmer | Date: | Mon, 12 Apr 2004 19:22:45 +0000 |
| Subject: | RE: [PHP-WIN] Date Math | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-23427@lists.php.net to get a copy of this message | ||
The function I like using is strtotime. You should be able to do
something like
strtotime("now") - strtotime("2/7/2004")
Or I think there is a date difference function. Though that might be
strtotime("now - 2/7/2004")
Charles Killmer
-----Original Message-----
From: Ron.Herhuth@tatumpartners.com
[mailto:Ron.Herhuth@tatumpartners.com]
Sent: Monday, April 12, 2004 2:04 PM
To: php-windows@lists.php.net
Subject: [PHP-WIN] Date Math
I am currently working on an application that needs to break out invoice
totals by age. This is a sample line item:
2/7/2004 ... $456.89
Current Total : Over 30 Days : Over 60 Days : Over 90 days
How can I determine the number of days from the current date? I should
be able to handle the rest.
Thanks in advance!
Ron