What the format is for:
3) “xs:date” ?
1) How can I define separator for date format?
2) How can I define format date for YYYY-MM-DD and how for YY-DD-MM?
3) How can I define format time for HH:MM (eg. 13:29) and how for HH:MM(am, pm) (eg. 01:29pm) ?
In advance, thanks a lot!
I am no expert when it comes to XML Schema data types, but I am afraid, that the most the things you are describing, won’t work this way.
The value spaces and the lexical representations of built-in datatypes can be found here:
Please note, that different representations of the same data type make applications more complex and probably inefficient, that’s why the lexical space of xs:date is restricted to CCYY-MM-DD (see http://www.w3.org/TR/xmlschema-2/#date)
It looks like am, pm for xs:time is not allowed. In this case you have to use something like this:
1:20 pm for Eastern Standard Time which is 5 hours behind Coordinated Universal Time (UTC), one would write: 13:20:00-05:00
(see also: http://www.w3.org/TR/xmlschema-2/#time)
If you really want to create a user-defined datatype, representing date and time formats (I wouldn’t recommend this), then you have to use xs:token as base type, and constrain the value space by using xs:pattern facet (supported with the new Tamino 4.1.1)