Diff between 2 date
am 06.10.2006 05:15:50 von Nandar
How to know diff between 2 date ?
tgl1 = 2006-10-05
tgl2 = 2006-10-06
result = 1 day
nandar
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: Diff between 2 date
am 06.10.2006 05:44:35 von Roby -
--0-1692451061-1160106275=:31507
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
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.
--0-1692451061-1160106275=:31507--
Re: Re: Diff between 2 date
am 06.10.2006 06:00:09 von Nandar
the problem is DATEDIFF command available in MySQL ver 4.1.1 above
----- Original Message -----
From: "Roby -"
To:
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
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: Re: Diff between 2 date
am 06.10.2006 06:22:23 von 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 -"
> To:
> 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
RE: Diff between 2 date
am 06.10.2006 16:11:52 von MIGUEL ANTONIO GUIRAO AGUILAR
I use CalcDateDiff.php class and it works pretty good!
I got it at PHP Classes.org
-----Original Message-----
From: Nandar [mailto:Nandar@batamtex.com]
Sent: Jueves, 05 de Octubre de 2006 10:16 p.m.
To: php-db@lists.php.net
Subject: [PHP-DB] Diff between 2 date
How to know diff between 2 date ?
tgl1 = 2006-10-05
tgl2 = 2006-10-06
result = 1 day
nandar
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Este mensaje es exclusivamente para el uso de la persona o entidad a quien esta dirigido; contiene informacion estrictamente confidencial y legalmente protegida, cuya divulgacion es sancionada por la ley. Si el lector de este mensaje no es a quien esta dirigido, ni se trata del empleado o agente responsable de esta informacion, se le notifica por medio del presente, que su reproduccion y distribucion, esta estrictamente prohibida. Si Usted recibio este comunicado por error, favor de notificarlo inmediatamente al remitente y destruir el mensaje. Todas las opiniones contenidas en este mail son propias del autor del mensaje y no necesariamente coinciden con las de Radiomovil Dipsa, S.A. de C.V. o alguna de sus empresas controladas, controladoras, afiliadas y subsidiarias. Este mensaje intencionalmente no contiene acentos.
This message is for the sole use of the person or entity to whom it is being sent. Therefore, it contains strictly confidential and legally protected material whose disclosure is subject to penalty by law. If the person reading this message is not the one to whom it is being sent and/or is not an employee or the responsible agent for this information, this person is herein notified that any unauthorized dissemination, distribution or copying of the materials included in this facsimile is strictly prohibited. If you received this document by mistake please notify immediately to the subscriber and destroy the message. Any opinions contained in this e-mail are those of the author of the message and do not necessarily coincide with those of Radiomovil Dipsa, S.A. de C.V. or any of its control, controlled, affiliates and subsidiaries companies. No part of this message or attachments may b
e used or reproduced in any manner whatsoever.
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: Diff between 2 date
am 06.10.2006 17:06:11 von Oskar
>I use CalcDateDiff.php class and it works pretty good!
Why use classes for such a simple calculation? It's the matter of 2 rows of code
$dif_sec=mktime(0,0,0,10,6,2006)-mktime(0,0,0,10,5,2006);
echo("diff is ".($dif_sec/(24*60*60))." days");
OKi98
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: Re: Diff between 2 date
am 10.10.2006 09:49:02 von 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