Microsoft Office Tutorials and References
In Depth Information
Displaying any date
Displaying any date
You can easily enter a date into a cell by simply typing it while using any of the date
formats that Excel recognizes. You can also create a date by using the DATE function,
which takes three arguments: the year, the month, and the day. The following formula, for
example, returns a date comprising the year in cell A1, the month in cell B1, and the day
in cell C1:
The DATE function accepts invalid arguments and adjusts the result accordingly. For example, the following formula
uses 13 as the month argument and returns January 1, 2013. The month argument is automatically translated as
month 1 of the following year:
Often, you’fill use the DATE function with other functions as arguments. For example, the
following formula uses the YEAR and TODAY functions to return the date for July 4 of the
current year:
The DATEVALUE function converts a text string that looks like a date into a date serial
number. The following formula returns 40508, which is the date serial number for August
22, 2013:
To view the result of this formula as a date, you need to apply a date number format to
the cell.
Be careful when using the DATEVALUE function. A text string that looks like a date in your country may not look like
a date in another country. The preceding example works i ne if your system is set for U.S. date formats, but it returns
an error for other regional date formats because Excel is looking for the 8th day of the 22nd month!
Generating a series of dates
Often, you want to insert a series of dates into a worksheet. For example, in tracking
weekly sales, you may want to enter a series of dates, each separated by seven days. These
dates will serve to identify the sales fi gures.
In some cases, you can use the Excel Auto Fill feature to insert a series of dates. Enter the
fi rst date and drag the cell’s fi fill handle while holding down the right mouse button. Release
Search JabSto ::

Custom Search