Excel Functions
Click on a link to see the associated Excel functions
Date and Time Functions
DATE
- Category: date_time
- User level: 2
- Syntax:
=DATE(year, month, day)
- Example:
=DATE(A1, A1, 15)
This function returns a date value composed of the year, month, and date supplied. Obviously, is not useful if you use the "literal" values in each parameters, but it can be very useful for using a literal as in this example: =DATE(A1, A1, 15) will return the 15th of the month for the month and year in A1. One of my favorite uses for this function is to get the 1st (or other date) of the month, which can then be used with other calculations (ex: late payments after the first of the month).
DAY
- Category: date_time
- User level: 2
- Syntax:
=DAY (date value)
- Example:
=DAY(A1)
This returns the day portion of a date. For the example, if A1 has date 7/17/1994, then =MONTH(A1) will return 17.
See YEAR and MONTH for the equivalent functions.
MONTH
- Category: date_time
- User level: 2
- Syntax:
=MONTH(date value )
- Example:
=MONTH(A1)
This returns the month portion of a date. For the example, if A1 has date 7/17/1994, then =MONTH(A1) will return 7.
See YEAR and DAY for the equivalent functions.
NOW
- Category: date_time
- User level: 1
- Syntax:
=NOW()
- Example:
=NOW()
This function returns the current time, using the computer system's time.
This function has no parameters. See the TODAY function for the equivalent function for the date.
TODAY
- Category: date_time
- User level: 1
- Syntax:
=TODAY()
- Example:
=TODAY()
This function returns the current day, using the computer system's time.
This function has no parameters. See the NOW function for the equivalent function for the time.
WEEKDAY
- Category: date_time
- User level: 2
- Syntax:
=WEEKDAY(number, [optional] return value)
- Example:
=WEEKDAY(A1)
This function returns the serial number for the day of the week (1 through 7) for this date, starting with Sunday as day 1. From Excel 2010 and later, you can change the starting point of the week with the return value.
There is no direct way to get the English name of the date of the week, but that can be obtained by combining this with a table lookup function, or other workarounds.
YEAR
- Category: date_time
- User level: 2
- Syntax:
=YEAR(date value )
- Example:
=YEAR(A1)
This returns the year portion of a date. For the example, if A1 has date 7/17/1994, then =YEAR(A1) will return 1994.
See MONTH and DAY for the equivalent functions.