Ec (2); in asp ,. in net, the date addition and subtraction is quite simple. A datediff function can calculate the time difference between two dates. This is also true when I learned php, but it is completely different from what I think. Below is a friend who writes the php date plus or minus & lt ;? PHP & nbsp; $ Date_1 & quot; format can also be: $ Date_1 & quot; 2003-6-2523: 29: 14 & qu script ec (2); script
In asp ,. in net, the date addition and subtraction is quite simple. A datediff function can calculate the time difference between two dates. This is also true when I learned php, but it is completely different from what I think. Below is a friend who writes a php date plus or minus
$ Date_1 = ""; // format: $ Date_1 = "23:29:14 ";
$ Date_2 = "2009-10-1 ";
$ Date_List_a1 = explode ("-", $ Date_1 );
$ Date_List_a2 = explode ("-", $ Date_2 );
$ D1 = mktime (0, 0, 0, $ Date_List_a1 [1], $ Date_List_a1 [2], $ Date_List_a1 [0]);
$ D2 = mktime (0, 0, 0, $ Date_List_a2 [1], $ Date_List_a2 [2], $ Date_List_a2 [0]);
$ Days = round ($ d1-$ d2)/3600/24 );
Echo "The difference between the two dates is $ Days ";
?>
Haha, as long as we use time N, it is not difficult.