Re: [PHP-DB] Re: Diff between 2 date

2006-10-10 Thread Christian Flothmann

the problem is DATEDIFF command available in MySQL ver 4.1.1 above


In MySQL versions  4.1.1 you can use the following construct:

SELECT TO_DAYS('2006-10-06') - TO_DAYS('2006-10-05')

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



[PHP-DB] Re: Diff between 2 date

2006-10-05 Thread Roby -
Using SQL statement: datediff, example:
SELECT datediff( day, '2006-10-05', '2006-10-06' )

Hope it helps you ;-)


-
 All-new Yahoo! Mail - Fire up a more powerful email and get things done faster.

Re: [PHP-DB] Re: Diff between 2 date

2006-10-05 Thread Skip Evans
Hey Nandar and all,

Check out this page:

http://www.developertutorials.com/tutorials/php/calculating-difference-between-dates-php-051018/page1.html

I found it by pluggin PHP difference between two dates into Google.

This one requires you have the date functions, including gregoriantojd()
in your PHP install. But if you don't, this one looks like it will do
the trick:
http://www.weberdev.com/get_example-3240.html

Skip

On Fri, 2006-10-06 at 11:00 +0700, Nandar wrote:
 the problem is DATEDIFF command available in MySQL ver 4.1.1 above
 
 - Original Message -
 From: Roby - [EMAIL PROTECTED]
 To: php-db@lists.php.net
 Sent: Friday, October 06, 2006 10:44 AM
 Subject: [PHP-DB] Re: Diff between 2 date
 
 
  Using SQL statement: datediff, example:
  SELECT datediff( day, '2006-10-05', '2006-10-06' )
 
  Hope it helps you ;-)
 
 
  -
   All-new Yahoo! Mail - Fire up a more powerful email and get things done
  faster.
 
 
 
 
 
 
 
 No virus found in this incoming message.
 Checked by AVG Free Edition.
 Version: 7.1.407 / Virus Database: 268.13.0/464 - Release Date: 10/5/2006
 
-- 
=-=-=-=-=-=-=-=-=-=-=-
Skip Evans
Big Sky Penguin, LLC
61 W Broadway
Butte, MT 59701
406-782-2240

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