Wednesday, May 30, 2012

How to calculate the difference between two dates using PHP?

I have two dates of the form:

Start Date: 2007-03-24
End Date: 2009-06-26

Now I need to find the difference between these two in the below form:

2 years, 3 months and 2 days

How can I do this in PHP?

Source: Tips4all

No comments:

Post a Comment