Converting time to seconds

    Date: 09/25/05 (PHP Community)    Keywords: php, sql

    Is there a simple function to convert time (hh:mm:ss) to seconds (or hours)?

    Basically I want to duplicate this SQL in PHP: sum(((TIME_TO_SEC(end_time) - TIME_TO_SEC(start_time))/3600) * rate)


    I've looked here but I dont think I see it.
    http://us2.php.net/manual/en/ref.datetime.php

    Source: http://www.livejournal.com/community/php/347080.html

« Birthdays problem || sendfile in PHP »


antivirus | apache | asp | blogging | browser | bugtracking | cms | crm | css | database | ebay | ecommerce | google | hosting | html | java | jsp | linux | microsoft | mysql | offshore | offshoring | oscommerce | php | postgresql | programming | rss | security | seo | shopping | software | spam | spyware | sql | technology | templates | tracker | virus | web | xml | yahoo | home