05-25-2018, 07:03 PM
[attachment=90 Wrote:Littlemaster pid='19403' dateline='1527269993']Can it be accurate to seconds without we giving the time in second? I do not think it can be unless we input time in seconds, between a simple code.
http://php.net/manual/en/dateinterval.format.php
you might do it by using the following:
PHP Code: (Select All)
echo $today->diff($dabi)->format('%y Years, %m Months, %d Days, %h Hours, %I Minutes, ' . ($today->diff($dabi)->format('%I')*60) . 'Seconds, ' . ($today->diff($dabi)->format('%s')*1000) . ' Milliseconds, ' . ($today->diff($dabi)->format('%s')*1000*1000000) . ' Nanoseconds, ' . ($today->diff($dabi)->format('%s')*1000*1000000*1000) . ' Microseconds');