Date and time functions
The functions in this category allow you to work with Excel defined date and time values. Excel stores dates as integers, 1 is 1/1/1900 and 2 is 1/2/1900. This explains why Excel can't work with dates earlier than 1/1/1900.
Today is 9/17/2018 and the Excel date is represented by 43360. The weekday is Monday and the week starts with Sunday in North America thus Monday is the second weekday in the week, demonstrated in cell C9.
Excel converts a date automatically, try and type a date in a cell and then select the cell, press CTRL + 1 to open the "Format cells" dialog box. Now change the format to "General" and press OK button. You can now see the integer in the cell that represents the date value.
|YEAR function||The year of an Excel date.|
|MONTH function||The month of an Excel date.|
|DAY function||The day of the month from an Excel date.|
|TODAY function||Returns the current date. Note, this function is volatile.|
|WEEKDAY function||Returns the weekday of an Excel date.|
Excel stores time as a decimal from 0 (zero) to 1. 0 is 12.00 a.m and 0.5 is 12.00 p.m. Each hour is 1/24 or approx. 0.041666667.
|HOUR function||The hour of an Excel defined time value.|
|MINUTE function||The minute of an Excel defined time value.|
|SECOND function||The second of an Excel defined time value.|
|NOW function||Returns the current time. Note, this function is volatile.|
Excel also allows you to store date and time combined. For example, 1.5 is 1/1/1900 12.00 p.m and 2.5 is 1/2/1900 12.00 p.m. The following functions lets you create an Excel defined date and time value.
|DATE function||An Excel date based on year, month and day.|
|TIME function||Excel time based on hour, minute and second.|
|DATEVALUE function||Excel date based on a text string.|
|TIMEVALUE function||Excel time based on a text string.|
These functions perform calculations to Excel defined date and time values.
|DATEDIF function||Returns the number of years, month and days between two dates.|
|EDATE function||Returns a date based on a start date and a given number of months.|
|EOMONTH function||The last date in a given month based on a start date and a number that represents the number of months.|
|NETWORKDAYS function||Returns the number of workdays between two dates.|
|WORKDAY function||The date based on a start date and a given number of workdays.|
|YEARFRAC function||The fraction of a year based on a start and end date and then number of days between.|