If you convert the dates to unix timestamps, they are then converted to the number of seconds that have passed since 01/01/1970. As they are in a nice linear fashion, simple subtraction does the trick.
The function you will need is: strtotime
Hello all.
how do i calculate the difference between dates. i.e if i make a transaction on 12/10/2007 and it is stored in my db. and the transaction was processed on 15/10/2007. is there a way i could write a code to calculate the difference with php? hope am making sense here!
thanks
If you convert the dates to unix timestamps, they are then converted to the number of seconds that have passed since 01/01/1970. As they are in a nice linear fashion, simple subtraction does the trick.
The function you will need is: strtotime
“The best thing about a boolean is even if you are wrong, you are only off by a bit.”