← Prev in month ← Prev in thread

DATEVALUE and TIMEVALUE with full DateTime support

From
Eike Rathke <>
Date
2007-03-21T19:33:54+00:00
ID
Thread
DATEVALUE and TIMEVALUE with full DateTime support
Hi,

The semantics of DATEVALUE( Text D ) explain that D should be a text
string in a date format, and for TIMEVALUE( Text T ) T should be in
a time format. Excel and OOo support a mixed DateTime string for both,
e.g. "1999-11-22 12:34:56". I think we should require that.

Additionally, DATEVALUE is supposed to return the integer part of the
date serial number the text was converted to, and TIMEVALUE the
fractional part. We do not state that, but should explicitly do so.
Excel has this behavior. OOo currently returns the full
integer+fractional number for both functions if a combined DateTime
string was passed, which I consider wrong. Gnumeric correctly returns
integer respectively fraction if passed either a Date string or a Time
string (both functions accept both string formats), but does not seem to
accept a combined DateTime string.

Opinions?

  Eike

-- 
Automatic string conversions considered dangerous. They are the GOTO statements
of spreadsheets.  --Robert Weir on the OpenDocument formula subcommittee's list.
← Prev in month ← Prev in thread