subtract time. Day is same

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • PhpHelp
    New Member
    • Apr 2011
    • 1

    subtract time. Day is same

    How can i subtract time? the day remains the same. i just need to subtract two time.

    Date = 2011-04-26 Starttime = 12:39:53 Endtime = 14:34:28

    now i need to calculate the time difference between Endtime and Starttime.

    Thanks
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    which PHP version do you have? as of PHP 5.3 you can use PHP’s date classes, otherwise you would have to convert via strtotime() and date().

    Comment

    Working...