Difference between revisions of "Documentation/How Tos/Calc: DATEVALUE function"

From Apache OpenOffice Wiki
Jump to: navigation, search
m
Line 2: Line 2:
  
 
== DATEVALUE ==
 
== DATEVALUE ==
returns the date-time serial number, from a date as text.  
+
returns the date-time serial number, from a date given as text.  
 
+
  
 
=== Syntax: ===
 
=== Syntax: ===
Line 10: Line 9:
  
 
: <tt>'''DATEVALUE'''</tt> returns the date-time serial number, which may be formatted to read as a date.
 
: <tt>'''DATEVALUE'''</tt> returns the date-time serial number, which may be formatted to read as a date.
 
  
 
=== Example: ===
 
=== Example: ===
 
<tt>'''DATEVALUE("2007-11-23")'''</tt>
 
<tt>'''DATEVALUE("2007-11-23")'''</tt>
 
: returns <tt>'''39409'''</tt>, the date-time serial number for 23Nov2007 (assuming the default date-time starting date)
 
: returns <tt>'''39409'''</tt>, the date-time serial number for 23Nov2007 (assuming the default date-time starting date)
 
  
 
=== See also: ===
 
=== See also: ===
Line 24: Line 21:
  
 
'''[[Documentation/How_Tos/Calc: Date & Time functions#Date and Time overview|Date & Time overview]]'''
 
'''[[Documentation/How_Tos/Calc: Date & Time functions#Date and Time overview|Date & Time overview]]'''
 
 
=== Issues: ===
 
The forthcoming ODFF standard requires <tt>'''DATEVALUE'''</tt> to return the date-time serial number as a date, so Calc should automatically format the result as a date. However currently Calc seems to return the date-time serial number as a number, requiring the user to format the result manually. See [http://www.openoffice.org/issues/show_bug.cgi?id=84903 Issue 84903]
 

Revision as of 10:04, 16 January 2008


DATEVALUE

returns the date-time serial number, from a date given as text.

Syntax:

DATEVALUE(datetext)

datetext is a date, expressed as text.
DATEVALUE returns the date-time serial number, which may be formatted to read as a date.

Example:

DATEVALUE("2007-11-23")

returns 39409, the date-time serial number for 23Nov2007 (assuming the default date-time starting date)

See also:

DATE, TIMEVALUE

Date & Time functions

Date & Time overview

Personal tools