Posts

Showing posts with the label Difference between 2 dates

Calculating the difference between 2 dates

Image
Excel Tip #002 Calculating the difference between 2 dates Calculating the difference between 2 dates is more frequent problem which most of us faced. Below is a solution for the same. We are going to use 2 Excel function in this post -  DATEDIF()  and  NOW() . Let us consider the first problem, calculating the difference between 2 dates where we will use the DATEDIF() function. The syntax of the DATEDIF() function is, =DATEDIF(start_date, end_date, unit) The value fields,  start_date  &  end_date  takes up the date.  unit  field is the time unit that we are going to use - years (y), months (m) or days (d). Consider 2 dates as an example in mmddyyyy format: Our start_date being 7/15/1967 (July 15, 1967) and end_date 12/8/1990 (December 8, 1990). The start_date and end_date are defined in cell B2 & B3 in my excel. To calculate the # of years . To denote the number of years, I have concatenated the text "year...