afridy — 2012-11-07T08:52:53-05:00 — #1
my date : 2012/9/13
i need to calculate the total number of milliseconds before 60days of above date (my date - 60 days).
i have done the calcuation as follows and i just want to make sure its correct
$expdt=strtotime($mydate) - 5184000000; //5184000000 is the number of milliseconds in 60days.
Is the above correct?
cups — 2012-11-07T09:21:43-05:00 — #2
Just to ask, are you then going to convert that number back to a date?
afridy — 2012-11-07T09:37:07-05:00 — #3
i have another date will call 'your date' = '2012/10/13', usually this date is after (greater than) 'my date'.
so i want to calcuate the number of days between 'my date' and 'your date'
the whole code i am writing will be like this
$mydate=strtotime($mydate) - 5184000000; //5184000000 is the number of milliseconds in 60days.
$days=round(($yourdate-$mydate) / 86400000); //not tested yet