* Kory Wheatley
[...]
> I'm seeing some discrepancy in the operation of the SEC_TO_TIME
> function, however.  Let's say my Duration is a value of 9.25.  When I
> multiply 9.25 by 3600, I get 33300.00.  When I use
> SEC_TO_TIME(33300.00), it returns 09:15:00, the correct value.  But when
> 
> I try putting it all together in one query like this:  SELECT
> SEC_TO_TIME(Duration * 3600) . . . it returns 09:00:00.  

Try using a 'float-aware' function:

mysql> select sec_to_time(floor(3600*9.25));
+-------------------------------+
| sec_to_time(floor(3600*9.25)) |
+-------------------------------+
| 09:15:00                      |
+-------------------------------+
1 row in set (0.00 sec)

-- 
Roger

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to