To achieve this, you need to use the units: “Y”, “YM”, and “MD”. This means that we will be able to copy the formula to other cells. Taking the above example one-step further, instead of referring to a static date of birth, we will be using a cell reference. In the below example we are going to be working out the age of people, by looking at the difference between their date of birth and today’s date, using the TODAY() Function.īecause we used a date function, this formula is now dynamic, and will always show the correct age. This allows your date differences to be up to date. “YM” – Year Months Using Date Functions within DateDifĪs well as using a static typed date, you can also use the TODAY() Function, when referring to today’s date. Let’s explore the syntax that makes up the DateDif Function. This example will return the difference in days between the 1 st January 2018, and the 24 th May 2018. Select the cell where you want to type your formula, and add the following: =DATEDIF(“”,”24/05/18”,”D”).
We will not be able to use this method for our DateDif Function, as it is not recognised, so we will have to type it manually.
Search for the Function you want to use, and select go. This will bring up the Insert Function Window.