W3C home > Mailing lists > Public > xmlschema-dev@w3.org > September 2002

XML dateTime Patterns...

From: Saurabh Agarwal <saurabh.agarwal@staralliance.com>
Date: Tue, 24 Sep 2002 06:30:29 -0400 (EDT)
Message-ID: <D6E0F5BF42B7534CA8EB4EF104360D8C4B42EB@fra-mbe-w2k.home.staralliance.com>
To: <xmlschema-dev@w3.org>
Hi,
 
Is it possible to change the format of a dateTime attribute using
patterns? If yes, can I have some examples...
 
For instance, is it possible to restict the dateTime
(CCYY-MM-DDThh:mm:ss) to just the 'Date' (DD) or "Hours and Minutes"
(hhmm).
 
for example....something like....
 
----------------------------------------------------
 
<xsd:simpleType name="utcDate">

    <xsd:restriction base="xsd:dateTime">

        <xsd:pattern value="DD"/>

    </xsd:restriction>

</xsd:simpleType>

-------------------------------------------------------------------

<xsd:simpleType name="utcTime">

     <xsd:restriction base="xsd:dateTime">

        <xsd:pattern value="hhmm"/>

    </xsd:restriction>

</xsd:simpleType>

----------------------------------------------------
 
Thanks,
Saurabh
Received on Wednesday, 25 September 2002 03:50:44 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:34 GMT