Jump to content

[SOLVED] difference in days.


art15

Recommended Posts

Hi,

 

I am trying to calculate the difference in days. The first date being :  $today= date("Y-m-d H:i:s");

 

the second date being $temp2="2008-03-21 10:56:18";

$days=$today-$temp2;

echo floor($days/60*60*24);

 

this echos 0 as the output. I cant figure out whats wrong.

can someone suggest?

 

Thanks

 

 

Link to comment
https://forums.phpfreaks.com/topic/103661-solved-difference-in-days/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.