Class DateValue

  • All Implemented Interfaces:
    Function, Function1Arg

    public class DateValue
    extends Fixed1ArgFunction
    Implementation for the DATEVALUE() Excel function.

    Syntax:
    DATEVALUE(date_text)

    The DATEVALUE function converts a date that is stored as text to a serial number that Excel recognizes as a date. For example, the formula =DATEVALUE("1/1/2008") returns 39448, the serial number of the date 1/1/2008. Any time element is ignored (see TimeValue). Remember, though, that your computer's system date setting may cause the results of a DATEVALUE function to vary from this example

    The DATEVALUE function is helpful in cases where a worksheet contains dates in a text format that you want to filter, sort, or format as dates, or use in date calculations.

    To view a date serial number as a date, you must apply a date format to the cell. Find links to more information about displaying numbers as dates in the See Also section.