DcVirtual
-
Posts
2 -
Joined
-
Last visited
Never
Posts posted by DcVirtual
-
-
Hello All,
I have a database which stores a total time value for each entrie:
Example Hours, Minutes, Seconds 02:15:33
I want to get the total of every row. I can get the sum but it displays the result as a whole number:
Example: 1236894 instead of 143:46:14
Type data: time
Null: No
Default: 00:00:00
Any help would be great. Thanks in advanced.
Help Please!!
in PHP Coding Help
Posted
Im not quite sure if i understand what you're asking but anyway, to do any maths on a date or time, you need to convert to a unix time stamp with [a href=\"http://php.inspire.net.nz/manual/en/function.mktime.php\" target=\"_blank\"]mktime()[/a] ]. You can then put it back into a normal format using [a href=\"http://php.inspire.net.nz/manual/en/function.date.php\" target=\"_blank\"]date()[/a]
[/quote]
The field in question already does this, I think. The data is listed in the format I want:
Field: TotalBlockTime
Data in this field is listed as: 02:15:33
I want to get the total TotalBlockTime of all rows.