How to calculate difference between two dates?

Someday, sometimes, you might need to Calculate difference between two dates. No need to bite your teeth and wander on the web! Here are some ways you can easily get the difference between any two dates. Let’s take two random dates.. Start Date: 2010-03-24  and  End Date: 2015-06-26 Use simple DateTime and DateInterval objects;