RE: [PHP-WIN] Convert time

2004-02-17 Thread Svensson, B.A.T. (HKG)
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,

Re: [PHP-WIN] Convert time

2004-02-16 Thread Meteorlet Woody
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

Re: [PHP-WIN] Convert time

2004-02-16 Thread Svensson, B.A.T. (HKG)
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.

RE: [PHP-WIN] Convert time

2004-02-16 Thread David Felton
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

Re: [PHP-WIN] Convert time

2004-02-16 Thread Svensson, B.A.T. (HKG)
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. --

Re: [PHP-WIN] Convert time

2004-02-16 Thread Svensson, B.A.T. (HKG)
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)($