[ create a new paste ] login | about

Link: http://codepad.org/1hkztJV7    [ raw code | output | fork ]

PHP, pasted on Nov 13:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?php

$date1 = "2012-11-05 12:35:00";
$date2 = "2012-11-07 14:35:00"; 
echo strtotime($date2) ."\n";
$diff = strtotime($date2) - strtotime($date1);
echo $diff ."\n";
$diff_in_hrs = $diff/3600;
print_r($diff_in_hrs);










?>


Output:
1
2
3
1352298900
180000
50


Create a new paste based on this one


Comments: