一旦我计算两位数的输出应该是不同的,然后excel表格在php


Once i Calculate two digit to output should be different then excel sheet in php

这里我必须像(1406354340,1406354341)一样的decimal数字,现在我在excel表格中对这两个数字应用一些公式,如下所示,假设有单元格c3c2,值为

c2 = 1406354340 and c3 = 1406354341   =(c3-c2)/86400

输出像1.18203E-05,然后我将更改单元格格式为[$-F400]h:mm:ss AM/PM以显示12:00:01 AM

现在我遵循上述格式适用于php。请参阅以下代码

$unix_time1='1406354340'; $unix_time2='1406354341';
$timestamp = (((float)$unix_time2)-((float)$unix_time1))/86400;
echo "<br>".date('h:m:s A',strtotime($timestamp));

输出将是:一旦我显示$timestamp 1.1574074074074E-5时间是01:01:00 AM

从php和Excel的输出是如此不同,为什么?

请帮我解决这个问题

我希望它能帮助你遵循代码

    $unix_time1='1406354340'; $unix_time2='1406354341';
    $timestamp = (($unix_time2)-($unix_time1));
   echo date('h:i:s A',strtotime($timestamp));

这将返回12:00:01 AM