That solution is like walking over the river to get water.
-Original Message-
From: Meteorlet Woody
To: php-windows
Sent: 17-2-2004 1:44
Subject: Re: [PHP-WIN] Convert time
Harpreet,Hello!
Another easy way like this:
$min = Date('i', mktime(0, 0, $totsec,
Harpreet,Helloļ¼
Another easy way like this:
$min = Date('i', mktime(0, 0, $totsec, 0, 0, 2004));
$sec = Date('s', mktime(0, 0, $totsec, 0, 0, 2004));
May this helps,
Meteorlet Woody
=== 2004-02-17 00:35:40 ===
>
>I am trying to add time. If my seconds or minutes
On Mon, 2004-02-16 at 17:46, Svensson, B.A.T. (HKG) wrote:
> Example:
>
> $min = (int)($sec/60);
> $min = $sec % 60;
>
Jesus "$min = $sec % 60 60;" should be "$sec = $sec % 60;"
I'll have a lot of funny bugs to behold in my code tomorrow
--
PHP Windows Mailing List (http://www.
lol
-Original Message-
From: Svensson, B.A.T. (HKG) [mailto:[EMAIL PROTECTED]
Sent: 16 February 2004 4:49
To: php-windows
Subject: Re: [PHP-WIN] Convert time
On Mon, 2004-02-16 at 17:46, Svensson, B.A.T. (HKG) wrote:
> There might be also a floor function you can instead of cast
On Mon, 2004-02-16 at 17:46, Svensson, B.A.T. (HKG) wrote:
> There might be also a floor function you can instead of casting, but of
> that I know nothing (read: I didn't search the man pages).
"There might also exist a floor function which you can use instead[...]"
time to leave work.
--
PHP is typeless and will convert your left hand operand to the type
returned by your right hand expression. You can deal with this by
casting the right hand expression to an integer when computing the
minutes. To compute the seconds, you better use the modulus operator(%).
Example:
$min = (int)($