Date Functions
Date Functions
DATE(year,month,day) --- Returns the serial number that represents a particular date.
Year The year argument can be one to four digits. Excel interprets the year argumen
the date system you are using. By default, Excel for W
For the 1900 date system:
If year is between 0 (zero) and 1899 (inclusive), Excel adds that value to 1900 to calculate the year.
For example, DATE(100,1,2) returns January 2, 2000 (1900+100).
If year is between 1900 and 9999 (inclusive), Excel uses that value as the year.
For example, DATE(2000,1,2) returns January 2, 2000.
If year is less than 0 or is 10000 or greater, Excel returns the #NUM! error value.
For the 1904 date system:
If year is between 4 and 1899 (inclusive), Excel adds that value to 1900 to calculate the year.
For example, DATE(100,1,2) returns January 2, 2000 (1900+100).
If year is between 1904 and 9999 (inclusive), Excel uses that value as the year.
For example, DATE(2000,1,2) returns January 2, 2000.
If year is less than 4 or is 10000 or greater or if year is between 1900 and 1903 (inclusive),
Excel returns the #NUM! error value.
Month is a number representing the month of the year. If month is greater than 12,
month adds that number of months to the first month in the year specified.
For example, DATE(1998,14,2) returns the serial number representing February
Day is a number representing the day of the month. If day is greater than the numbe
in the month specified, day adds that number of days to the first day in the month.
For example, DATE(1998,1,35) returns the serial number representing February
EDATE(start_date,months) --- Returns the serial number that represents the date that is the indicated number of
Months is the number of months before or after start_date. A positive value for mon
yields a future date; a negative value yields a past dat
If start_date is not a valid date, EDATE returns the #NUM! error value.
If months is not an integer, it is truncated.
DATEVALUE(date_text) --- Returns the serial number of the date represented by date_text. Use DATEVALUE to convert a date
Date_text is text that represents a date in an Excel date format. For example, "1/30
30-Jan-1998 are text strings within quotation marks th
42081
DATEDIF(start_date,end_date,unit) --- Calculates the number of days, months, or years between two dates.
Start_date is a date that represents the first, or starting, date of the period. Dates m
as text strings within quotation marks (for example, "2
31
(for example, 36921, which represents January 30, 20
22
or as the results of other formulas or functions (for exa
End_date is a date that represents the last, or ending, date of the period.
Unit is the type of information you want returned.
DAY(serial_number) --- Returns the day of a date, represented by a serial number. The day is given as an integer ranging from
Serial_number is the date of the day you are trying to find. Dates may be entered as text strings within quotati
marks (for example, "1/30/1998" or "1998/01/30"), as serial numbers (for exam
which represents January 30, 1998, if you're using the 1900 date system), or a
formulas or functions (for example, DATEVALUE("1/30/1998")).
18
NETWORKDAYS(start_date,end_date,holidays) --- Returns the number of whole working days between start_date
10 Start_date is a date that represents the start date. Dates may be entered as text str
within quotation marks (for example, "1/30/1998" or "1
(for example, 35825, which represents January 30, 19
system), or as results of other formulas or functions (f
End_date is a date that represents the end date.
Holidays is an optional range of one or more dates to exclude from the working cale
as state and federal holidays and floating holidays. T
that contain the dates or an array constant of the seria
NOW( ) --- Returns the serial number of the current date and time.
8/28/2015 14:19
TODAY( ) --- Returns the serial number of the current date. The serial number is the
date-time code used by Microsoft Excel for date and time calculations.
8/28/2015
EOMONTH(start_date,months) --- Returns the serial number for the last day of the month that is the indicated number of mon
Start_date is a date that represents the starting date. Dates may be entered as text
Months is the number of months before or after start_date. A positive value for mon
YEAR(serial_number) --- Returns the year corresponding to a date. The year is returned as an integer in the range 1900-9999
Serial_number is the date of the year you want to find. Dates may be entered as text strings
within quotation marks (for example, "1/30/1998" or "1998/01/30"), as serial nu
2015
(for example, 35825, which represents January 30, 1998, if you're using the 19
or as results of other formulas or functions (for example, DATEVALUE("1/30/19
TIME(hour,minute,second) --- Returns the decimal number for a particular time. The decimal number returned by TIME is
a value ranging from 0 to 0.99999999, representing th
(12:00:00 A.M.) to 23:59:59 (11:59:59 P.M.)..
Hour is a number from 0 (zero) to 23 representing the hour.
Minute is a number from 0 to 59 representing the minute.
Second is a number from 0 to 59 representing the second.
HOUR(serial_number) --- Returns the hour of a time value. The hour is given as an integer,
ranging from 0 (12:00 A.M.) to 23 (11:00 P.M.).
Serial_number is the time that contains the hour you want to find. Times may be entered as text strings within
quotation marks (for example, "6:45 PM"), as decimal numbers (for example, 0
represents 6:45 PM), or as results of other formulas or functions (for example,
TIMEVALUE("6:45 PM")).
MINUTE(serial_number) --- Returns the minutes of a time value. The minute is given as an integer, ranging from 0 to 59.
Serial_number is the time that contains the minute you want to find. Times may be
text strings within quotation marks (for example,
(for example, 0.78125, which represents 6:45 PM
or functions (for example, TIMEVALUE("6:45 PM
SECOND(serial_number) --- Returns the seconds of a time value. The second is given as an integer in the range 0 (zero) to 5
Serial_number is the time that contains the seconds you want to find. Times may b
DAYS360
Calculates the number of days between two dates based on a 360-day year
DAYS360(start_date,end_date,method)
METHOD:
start
1/28/2008
end
1/31/2008
Formula
Description
Number of days between the two dates above, based on a 360-day year
EDATE
Returns the serial number of the date that is the indicated number of months before or after the start date
EDATE(start_date,months)
1/15/2008
Formula
Description
The date, one month after the date above
The date, one month before the date above
The date, two months after the date above
Description
0.1 Decimal part of a day, for the time
0.2743055556 Decimal part of a day, for the time
WEEKDAY
Converts a serial number to a day of the week
WEEKDAY(serial_number,return_type)
5 Return_type
1-SUNDAY; 2- MONDAY; 3- 0 1 or omitted
Data
1/1/2008
2
Formula
Description
3
Day of the week, with numbers 1 (Sunday) through 7 (Saturday)
Day of the week, with numbers 1 (Monday) through 7 (Sunday)
WEEKNUM
Converts a serial number to a number representing where the week falls numerically with a year
WEEKNUM(serial_num,return_type)
12 Serial_num
Data
1
9-Mar-08
2
Formula
Description
Number of the week in the year, with a week beginning on Sunday
Number of the week in the year, with a week beginning on Monday
Note March 9, 2008 is a Sunday.
WORKDAY
Returns the serial number of the date before or after a specified number of workdays
WORKDAY(start_date,days,holidays)
12/2/2008
Date
Description
6/1/2008 Start date
130 Days to completion
11/26/2008 Holiday
12/4/2008 Holiday
11/21/2008 Holiday
Formula
Description
Date 130 workdays from the start date 11/28/2008)
Date 130 workdays from the start date, excluding holidays
YEARFRAC Returns the year fraction representing the number of whole days between start_date and end_date
YEARFRAC(start_date,end_date,basis)
Data
Description
1/1/2008 Start date
7/30/2008 End date
2 Actual/360
Formula
Description (Result)
0.5861111111 Fraction of the year between the two dates
211/360
rticular date.
months before or after a specified date (the start_date). Use EDATE to calculate maturity
ates or due dates that fall on the same day of the month as the date of issue. For more
nformation about how Microsoft Excel uses serial numbers for dates, see the Remarks section.
sents the start date. Dates may be entered as text strings within
uotation marks (for example, "1/30/1998" or "1998/01/30"), as serial numbers (for example, 35825,
hich represents January 30, 1998, if you're using the 1900 date system), or as results of other
nted by date_text. Use DATEVALUE to convert a date represented by text to a serial number.
ystem in Excel for Windows, date_text must represent a date from January 1, 1900, to
December 31, 9999. Using the default date system in Excel for the Macintosh, date_text must
epresent a date from January 1, 1904, to December 31, 9999. DATEVALUE returns the
#VALUE! error value if date_text is out of this range.
s omitted, DATEVALUE uses the current year from your computer's built-in clock. Time information in date_text is ignored.
calculations.
serial number.
day of the month that is the indicated number of months before or after start_date. Use EOMONTH to calculate maturity dates or due dates
sents the starting date. Dates may be entered as text strings within quotation marks (for example, "1/30/1998" or "1998/01/30"), as serial nu
hs before or after start_date. A positive value for months yields a future date; a negative value yields a past date.
5/31/2015
ven as an integer,
to 23 (11:00 P.M.).
d on a 360-day year
FALSE or omitted: IF THE STARTING DATE IS 31 THEN IT WILL MOVED IT TO THE 30.
TRUE: IT WILL MOVE BACK OR FORWARD
Number returned
Numbers 1 (Sunday) through 7 (Saturday). Behaves like previous versions of Microsoft Excel.
Week Begins
Week begins on Sunday. Weekdays are numbered 1 through 7.
Week begins on Monday. Weekdays are numbered 1 through 7.
ed number of workdays
42081.00
1.00
2.00
1/18/2015
_text is ignored.
ulate maturity dates or due dates that fall on the last day of the month.
98" or "1998/01/30"), as serial numbers (for example, 35825, which represents January 30, 1998, if you're using the 1900 date system), or a
U.S. (NASD) method. If the starting date is the 31st of a month, it becomes equal to the 30th of the same month. If the ending date is the 3
European method. Starting dates and ending dates that occur on the 31st of a month become equal to the 30th of the same month.
5
11
he 1900 date system), or as results of other formulas or functions (for example, DATEVALUE("1/30/1998")).
. If the ending date is the 31st of a month and the starting date is earlier than the 30th of a month, the ending date becomes equal to the 1s
of the same month.
ate becomes equal to the 1st of the next month; otherwise the ending date becomes equal to the 30th of the same month.