Convert Hours to Decimal

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hey Tim,

I got a select string:

select timediff(cast(out_1 as time), cast(in_1 as time)) tHours FROM lm_tc_trans WHERE tc_trans_id = '42'

result = 08:45:00

How do i convert that to a FLOAT (5,2) =  8.75

or

result = 08:15:00

How do i convert that to a FLOAT (5,2) =  8.25

Don Wieland

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



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux