ID EN
#Date and time

DATEVALUE

Excel Functions

Convert a date in text format to a valid date

Syntax

EXCEL
=DATEVALUE(date_text)

Arguments

Parameter Description
date_text A valid date in text format.

Return Value

A valid Excel time as a serial number

Details

Sometimes, dates in Excel appear as text values that are not recognized as proper dates. The DATEVALUE function is meant to convert a date represented as a text string into a valid Excel date. Proper Excel dates are more useful than text dates since they can be formatted as a date, and directly manipulated with other formulas. The DATEVALUE function takes just one argument, called date_text. If date_text is a cell address, the value of the cell must be text. If date_textis entered directly into the formula it must be enclosed in quotes. To illustrate how the DATEVALUE function works, the formula below shows how the text "3/10/1975" is converted to the date serial number 27463 by DATEVALUE: Note that DATEVALUE returns a serial number, 27463, which represents March 10, 1975 in Excel's date s

Examples

Examples

To illustrate how the DATEVALUE function works, the formula below shows how the text "3/10/1975" is converted to the date serial number 27463 by DATEV

EXCEL
=DATEVALUE("3/10/1975")  // returns 27463
Examples

In the example shown, column B contains dates entered as text values, except for B15, which contains a valid date. The formula in C5, copied down, is:

EXCEL
=DATEVALUE(B5)
Alternative formula

Notice that the DATEVALUE formula in C15 fails with a #VALUE! error, because cell B15 already contains a valid date. This is a limitation of the DATEV

EXCEL
=A1+0

See Also

TIMEVALUE VALUE NUMBERVALUE