Hi Chrissie,

If you like to know the exact range of valid syntaxes, you could also refer to 
the W3C specification (http://www.w3.org/TR/xmlschema-2/#dateTime and following 
sections) though it is rather terse.

Just googling for 'xsd date' made me stumble across a book about relax ng that 
happens to provide a consice description of the xsd datatype: 
http://books.xmlschemata.org/relaxng/ch19-77041.html (and the next pages)

For general impressions I usually go to w3schools site: 
http://www.w3schools.com/Schema/schema_dtypes_date.asp

Kind regards,
Geert

>


Drs. G.P.H. Josten
Consultant


http://www.daidalos.nl/
Daidalos BV
Source of Innovation
Hoekeindsehof 1-4
2665 JZ Bleiswijk
Tel.: +31 (0) 10 850 1200
Fax: +31 (0) 10 850 1199
http://www.daidalos.nl/
KvK 27164984
De informatie - verzonden in of met dit emailbericht - is afkomstig van 
Daidalos BV en is uitsluitend bestemd voor de geadresseerde. Indien u dit 
bericht onbedoeld hebt ontvangen, verzoeken wij u het te verwijderen. Aan dit 
bericht kunnen geen rechten worden ontleend.


> From: [email protected]
> [mailto:[email protected]] On Behalf Of
> Danny Sokolsky
> Sent: donderdag 2 juli 2009 0:59
> To: General Mark Logic Developer Discussion
> Subject: RE: [MarkLogic Dev General] Date, Datetime, and time
> formats for element range indexes
>
> Hi Chrissie,
>
> The types are just xml types, so anything that is a valid xml
> date (or whichever type you want) will work as an element
> value for a range index.
>
> To know if the value will work, you can do a cast to that
> type.  For example, "2009-07-01" is a valid date because the
> following returns a value:
>
> xs:date("2009-07-01")
>
> "2009-13-01" is not valid because the following returns an exception:
>
> xs:date("2009-13-01")
>
> [1.0-ml] XDMP-CAST: (err:FORG0001) xs:date("2009-13-01") --
> Invalid cast: "2009-13-01" cast as xs:date
>
> Here is a dateTime example:
>
> xs:dateTime("2009-07-01T15:53:14.187-07:00")
>
> I find the Context F&Os help me to figure out the formats, as
> these return various time-based datatypes:
>
> http://developer.marklogic.com/pubs/4.1/apidocs/ContextBuiltins.html
>
> fn:current-date()
> fn:current-dateTime()
> fn:current-time( )
>
>
> XML date formats are quite fussy, though, and there are a ton
> of xquery functions to help deal with them.
>
> -Danny
>
>
>
>
> From: [email protected]
> [mailto:[email protected]] On Behalf Of
> Childers, Chrissie N
> Sent: Wednesday, July 01, 2009 2:33 PM
> To: [email protected]
> Subject: [MarkLogic Dev General] Date, Datetime, and time
> formats for element range indexes
>
> Hi, I am trying to use the element range indexes and am
> wondering what the required formats are for the date,
> datetime, and time datatypes, i.e. YYYY-MM-DD Thank you!
> _______________________________________________
> General mailing list
> [email protected]
> http://xqzone.com/mailman/listinfo/general
>

_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general

Reply via email to