arrow_upward

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to Calculate your Age with full detailes by Date of Birth (PHP)
#7
[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'); 
you can get the seconds by multiplying the Minutes in 60.
Thanks to @Post4VPS & @Hostdare for Providing their VPS Hosting Services: VPS 12



Possibly Related Threads…
Thread
Author
Replies
Views
Last Post

person_pin_circle Users browsing this thread: 2 Guest(s)
Sponsors: VirMach - Host4Fun - CubeData - Evolution-Host - HostDare - Hyper Expert - Shadow Hosting - Bladenode - Hostlease - RackNerd - ReadyDedis - Limitless Hosting