Excel, DATEVALUE() Function
The DATEVALUE() function receives as input a text string representing a date. The function returns as output the date value corresponding to the input date text string.
Date_Text: A text string representing a date.
In the example below, using the DATEVALUE() function the expression “Jan, 23, 2002” is converted to a date:
You might be wondering why we would want to convert the expression “Jan, 23, 2002” to a date value using the DATEVALUE() function? Why didn’t we just write the expression “Jan, 23, 2002” in cell A1 instead of using the function below:
The expression “Jan, 23, 2002” is a text string. The result of the function above is a date value. There are many built in functions in Excel which only accept date values:
Therefore if you wish to use those functions you must convert the date expression into a date value.
Below you can see some of the accepted input text string formats. Note the output of the function in all the examples is a date value. The output date format depends on the number format chosen for the cell: