> For the complete documentation index, see [llms.txt](https://books-gyansetu.gitbook.io/advanced-excel/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://books-gyansetu.gitbook.io/advanced-excel/functions-if-and-or-concatenate-date-time-dated-if.md).

# Date Time Functions - Date, Year, Month, Day, Time, Hour, Minute, Second, Today, Now, Datedif

**Date**

Returns a date, from a user-supplied year, month and day

> **=DATE(year, month, day)**

**Year**

Returns the year from a user-supplied date

> **=YEAR(serial\_number)**

**Month**

Returns the month from a user-supplied date

> **=MONTH(serial\_number)**

**Day**

Returns the day (of the month) from a user-supplied date

> **=DAY(serial\_number)**

**Time**

Returns a time, from a user-supplied hour, minute and second

> **=TIME(hour, minute, second)**

**Hour**

Returns the hour part of a user-supplied time

> **=HOUR(serial\_number)**

**Minute**

Returns the minute part of a user-supplied time

> **=MINUTE(serial\_number)**

**Second**

Returns the seconds part of a user-supplied time

> **=SECOND(serial\_number)**

**Today**

Returns today's date

> **=TODAY()**

**Now**

Returns the current date & time

> **=NOW()**

**DatedIf**

The Microsoft Excel DATEDIF function returns the difference between two date values, based on the interval specified.

The DATEDIF function is a built-in function in Excel that is categorized as a *Date/Time Function*. It can be used as a worksheet function (WS) in Excel. As a worksheet function, the DATEDIF function can be entered as part of a formula in a cell of a worksheet.

> **=DATEDIF(start\_date, end\_date, return\_unit)**

![](https://2721809844-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LR_tHSREe3Wm40fY9NG%2F-LRuo0c0UE-RWI8YVqeC%2F-LRuoMFtUatHCuowL0p_%2Fimage.png?alt=media\&token=2f7f6c62-5f56-4c97-b74d-fec8b2c57bf6)

{% file src="/files/-LRupKGnMWhBHAQn-Dn1" %}
Date-Time Formulas Examples
{% endfile %}
