Re: Calculating difference between two days

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, June 14, 2006 11:45 am, afan@xxxxxxxx wrote:
> I need to calculate no. of days between two dates, actually between
> date
> stored in DB and today's date.

Almost for sure your best answer is actually in your SQL engine with
something like date_subtract in MySQL.

PHP's date functions are, err, a but unwieldy...

I mean, okay, if you already have the four or five different software
packages installed, and you understand them, I'm sure it's really very
nice, but for the simple usage, for what most people need, the SQL
date-handling is generally sufficient and easier.

> Does anybody has an example I can use?

http://dev.mysql.com/ will have one if you search for date_add, almost
for sure.

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux