Jump to content

subtract datetime to get total hours and days


jkkenzie

Recommended Posts

		
$startdt = $_POST['startdt'].":".$_POST['starttmh'].":".$_POST['starttmm'].":".$_POST['sAMPM'];  // 09/08/2011:11:35:AM
$enddt = $_POST['enddt'].":".$_POST['endtmh'].":".$_POST['endtmm'].":".$_POST['eAMPM']; //09/09/2011:11:35:AM

 

From the code above I want to subtract 09/08/2011:11:35:AM    from  09/09/2011:11:35:AM and get the total number of hours.

 

A simple solution would be highly appreciated:

 

thanks in advance:

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.