How To Know the Difference or Time Duration Between Two Dates in PHP
Have you ever got difficulty when you want to calculate the difference or the time duration between two dates by using PHP? For example, the first date is ’2009-12-01 11:12:13′, and the second date is ’2009-12-04 14:15:16′, so the difference or the time duration between this two dates will give a result as: ’3 Day(s), 3 Hour(s), 3 Minute(s), 3 Second(s).’. We will make the function in order to make you easy to implement this calculation in your PHP code. Please note that your date format must be in this order: ‘yyyy-MM-dd hh:mm:ss’ as possible, otherwise, this function will not work properly, I guess. Read more…



Recent Comments