ahmad_albab
(Ahmadalbabxxx)
February 23, 2014, 5:00am
1
hi guys…
i’m having a problem to auto-calculate the date…
i mean,how to calculate the day between date?
for example; Jan 26th until Jan 30th = 5 days…
i already try this method, but it still doesn’t calculate it…
<?php
$date_start = new DateTime('');
$date_end= new DateTime('');
echo $duration = $date_start->diff($date_end)->days;
?>
i refered from THIS and also THIS.
i hope anyone can help me to solve this problem…
thank you…
mateeyow
(Matthewt)
February 25, 2014, 1:50am
2
You should not repost your topic just because you nobody answered the previous topic. Anyway. Have you tried implementing TIMESTAMP in your application. If not you can look into these tutorials:
http://www.tizag.com/phpT/phpdate.php
http://www.tareeinternet.com/forum/knowledgebase/53-detailed-timestamp-information-tutorial.html
ahmad_albab
(Ahmadalbabxxx)
February 25, 2014, 8:39am
3
i’m sorry for repost my topic and asked the same stupid question…