Microsoft Excel Date Function
Basic Description
The Excel Date function, when supplied with integers representing a year, month and day, returns an Excel date.
The syntax of the function is :
DATE( year, month, day )
Date Function Examples
The following spreadsheet shows the Date function applied to different sets of values.
Formulas:
|
Results:
|
Month and Day Arguments
Typically, the month will be between 1 and 12 and the day will be between 1 and 31. However, these values can extend below or above these ranges, in which case, they behave as follows:
month | - |
If the supplied month argument is negative or is greater than 12, the date extends back or forward, into the previous or following year. For example:
| ||||||||||||||||||||||||
day | - |
If the supplied day argument is negative or is greater than 31, the date extends back or forward, into the previous or following month. For example:
|
Date Function Common Problem
Common Problem:
The result of your Date function looks like a number (eg. "41061"), instead of a date.
Solution:
This is likely to be due to the formatting of the cell. I.e. the function has actually returned the correct value, but the cell is displaying the date serial number, instead of the formatted date.
To correct this,
- Highlight the cell(s) with the wrong formatting
- Right click with the mouse
- Select the Format Cells ... option and ensure the Number tab is selected
- Under the Category heading, select the option Date and click OK
No comments:
Post a Comment