How to Use Excel's DateValue Function

By eHow Computers Editor

Rate: (1 Ratings)

Excel's DATEVALUE function returns the serial number for a specified date. Excel uses this serial number internally to store dates and it is also used by the programmer to perform date calculations. The following steps will show how to use Excel's DATEVALUE function.

Instructions

Difficulty: Moderate

Step1
Learn the syntax for DATEVALUE. It is DATEVALUE(date_text) where date_text is a text value that represents a date in any Excel date format. Text values such as "12/30/2007" or "30-Dec-2008" are valid formats.
Step2
Study the date system for your version of Excel. Excel for Windows uses a serial number of 1 to represent January 1, 1900, and Excel for the Macintosh begins its dating system with January 2, 1904. Most date functions convert date values to a serial number automatically.
Step3
Store dates up to and including December 31, 9999, with either system. DATEVALUE will return the #VALUE! error value if date_text is out of the allowable range for the dating system being used.
Step4
Observe that DATEVALUE will use the current year from your computer's clock if it is omitted in date_text. The time information in date_text will be ignored.
Step5
Look at some examples of DATEVALUE: =DATEVALUE("1/1/1900") returns 1 in the 1900 dating system. Use this function to verify the dating system being used; =DATEVALUE("8/22/2008") returns 39,682 in the 1900 dating system. 8/22/2008 is the 39,682nd day since 1/1/1900; =DATEVALUE(22-AUG-2008) returns 39,682. Note that the same serial number is returned even though a different date format was used; =DATEVALUE("22-AUG") returns 39,682, assuming the system year is set to 2008.

Post a Comment

POST A COMMENT

Request a New How-To Article

Looking for more How To information? Chances are there’s an eHow member who knows how to do what you’re looking to do. Submit an article request now!

eHow Article:  How to Use Excel's DateValue Function

eHow Computers Editor

eHow Computers Editor

Category: Computers

Articles: See my other articles

Related Ads