Class DateValue
- java.lang.Object
-
- org.apache.poi.ss.formula.functions.Fixed1ArgFunction
-
- org.apache.poi.ss.formula.functions.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 exampleThe 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.
-
-
Constructor Summary
Constructors Constructor Description DateValue()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ValueEval
evaluate(int srcRowIndex, int srcColumnIndex, ValueEval dateTextArg)
-
Methods inherited from class org.apache.poi.ss.formula.functions.Fixed1ArgFunction
evaluate, evaluate
-
-
-
-
Method Detail
-
evaluate
public ValueEval evaluate(int srcRowIndex, int srcColumnIndex, ValueEval dateTextArg)
Description copied from interface:Function1Arg
-
-