Re: [bdbxml] DATE_TIME format
John Snelson <[email protected]> Mon, 19 Sep 2005 22:51:10 +0100
| Newsgroups | gmane.comp.db.dbxml.general |
|---|---|
| Message-ID | <[email protected]> |
Mark Robert Salamon wrote:
> what is the format for a DATE_TIME XmlValue. The Getting Started guide
> shows:
>
> "2005-10-5T04:18:36"
If that is what the getting started guide shows, then it is wrong:
http://www.w3.org/TR/xmlschema-2/#dateTime
> which appears to be:
> yyyy-MM-dTHH:mm:ss
'-'? yyyy '-' mm '-' dd 'T' hh ':' mm ':' ss ('.' s+)? (zzzzzz)?
is the correct format - read the link above for an explaination.
> Can't figure out a few things:
>
> is only 1 date (date of the month) field ok, or is 2 acceptable (9 vs
> 09)? Usually, 2 is required.
You need two digits for both month and day.
> What is the letter T for between the date and Time?
T is for Time, I presume.
> Is the hour done on a 24 hour basis? If so, is this 0 to 23 or 1 to 24?
Normally 0-23, although 24:00:00 is allowed.
> I tried just a date.toString() method, but that did not work. Somewhere
> on the web it shows that as being ok.
You can find almost anything on the web... ;-)
John
--
John Snelson, Berkeley DB XML Engineer
Sleepycat Software, Inc
http://www.sleepycat.com
Contracted to Sleepycat through Parthenon Computing Ltd
http://blog.parthcomp.com/dbxml
------------------------------------------
To remove yourself from this list, send an
email to [email protected]