![]() |
Alexey admin 5/1/2007 |
Evan, Also, how can I calculate the difference between 2 dates that were created using the now() function? Use this code snippet to calculate a difference between two dates in YYYY-MM-DD HH:MM:SS format: $date1="2007-01-01"; $date2=now(); $tm1=db2time($date1); $tm2=db2time($date2); $time1=mktime($tm1[3],$tm1[4],$tm1[5],$tm1[2],$tm1[1],$tm1[0]); $time2=mktime($tm2[3],$tm2[4],$tm2[5],$tm2[2],$tm2[1],$tm2[0]); $diff=$time2-$time1; echo "seconds elapsed from the beginning of year: ".$diff; |
![]() |
Sergey Kornilov admin 5/1/2007 |
Here are several examples of calculating date difference in PHP: |
E
|
evan_ad2000 author 5/7/2007 |
Evan, I need to take a closer look at your pages to help you. Please publish your project on Demo account then send a URL along with instructions on reproducing the issue to support@xlinesoft.com Use this code snippet to calculate a difference between two dates in YYYY-MM-DD HH:MM:SS format:
|