Top Description Fields Constructors Methods
org.apache.poi.ss.formula.functions

public Class DateValue

extends Fixed1ArgFunction
Class Inheritance
Imports
org.apache.logging.log4j.LogManager, .Logger, org.apache.poi.ss.formula.eval.*, org.apache.poi.ss.util.DateParser, org.apache.poi.ss.usermodel.DateUtil, java.time.DateTimeException

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.

Field Summary

Modifier and TypeField and Description
private static final Logger

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public ValueEval
Inherited from org.apache.poi.ss.formula.functions.Fixed1ArgFunction:
evaluate

Field Detail

LOGback to summary
private static final Logger LOG

Constructor Detail

DateValueback to summary
public DateValue()

Method Detail

evaluateback to summary
public ValueEval evaluate(int srcRowIndex, int srcColumnIndex, ValueEval dateTextArg)

Implements org.apache.poi.ss.formula.functions.Function1Arg.evaluate.

Doc from org.apache.poi.ss.formula.functions.Function1Arg.evaluate.

see Function#evaluate(ValueEval[], int, int)

Annotations
@Override