W3C home > Mailing lists > Public > xmlschema-dev@w3.org > October 2001

Re: MS SQL Server DateTime Type

From: Martin Duerst <duerst@w3.org>
Date: Mon, 22 Oct 2001 17:22:41 +0900
Message-Id: <>
To: "Sean Gerety" <SGerety@extremelogic.com>, <xmlschema-dev@w3.org>
At 01:32 01/09/27 -0400, Sean Gerety wrote:
>Thanks all for answers to my nillable question.  I now have a question
>regarding DateTime Datatypes.  As the current spec states a valid
>DateTime DataType would appear in an instance document like so.
>How would one create a MS SQL Server DateTime?  The only thing that I
>can think of is to use a facet.  Any thoughts?
><validSQLServerDateTime>8/2/2001 5:30:00 PM</validSQLServerDateTime>

Hello Sean,

You can't do that in XML Schema, because it would be very
difficult to describe all the various date formats used
around the world with facets. What you can do are two things:

- Convert from MS SQL format to XML Schema format, and use that.
- Use the following kind of markup:

  <yourDateTime value='2001-08-02T17:30:00'>8/2/2001 5:30:00 PM</yourDateTime>

Both of these solutions will be much more interoperable than just
shipping dates out in your preferred format only.

Regards,   Martin.
Received on Monday, 22 October 2001 04:55:01 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:14:54 UTC