# Date and Time maths with Excel

To perform date and time calculations in Excel, you can use various functions and formulas. Here are some common operations you can perform:

**Adding or subtracting days from a date:**
To add or subtract a specific number of days from a given date, you can use the `DATE`

function along with the `+`

or `-`

operators. For example, to add 5 days to a date in cell A1, you can use the formula `=A1 + 5`

.

**Adding or subtracting months from a date:**
To add or subtract a specific number of months from a given date, you can use the `EDATE`

function. For example, to add 3 months to a date in cell A1, you can use the formula `=EDATE(A1, 3)`

.

**Adding or subtracting years from a date:**
To add or subtract a specific number of years from a given date, you can use the `DATE`

function along with the `+`

or `-`

operators. For example, to subtract 2 years from a date in cell A1, you can use the formula `=A1 - 2*365`

.

**Calculating the difference between two dates:**
To calculate the number of days, months, or years between two dates, you can use the `DATEDIF`

function. For example, to calculate the number of days between two dates in cells A1 and B1, you can use the formula `=DATEDIF(A1, B1, "D")`

.

**Calculating the current date and time:**
To display the current date and time in a cell, you can use the `NOW`

function. For example, the formula `=NOW()`

will display the current date and time.

**Extracting specific components from a date or time:**
To extract specific components, such as the day, month, year, hour, minute, or second, from a date or time value, you can use various functions like `DAY`

, `MONTH`

, `YEAR`

, `HOUR`

, `MINUTE`

, and `SECOND`

. For example, to extract the month from a date in cell A1, you can use the formula `=MONTH(A1)`

.

These are just a few examples of the date and time calculations you can perform in Excel. Excel offers a wide range of functions to manipulate date and time values according to your specific requirements.