all groups > dotnet xml > january 2006 >
You're in the

dotnet xml

group:

Standard datetime format?


Standard datetime format? Chris Ashley
1/27/2006 6:26:27 AM
dotnet xml: Hi,

I have an XML web service which accepts a few datetime values. We have
some clients using it who are using different systems (java etc) and
they need to know what the standard format for a datetime node should
be? Have tried DD/MM/YY but no luck. Anybody know?

Thanks,

Chris
Re: Standard datetime format? Martin Honnen
1/27/2006 3:54:04 PM


[quoted text, click to view]


[quoted text, click to view]

What kind of datatime, the .NET Framework DateTime structure
<http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemDateTimeClassTopic.asp>

[quoted text, click to view]

According to
<http://samples.gotdotnet.com/quickstart/aspplus/default.aspx?url=%2fquickstart%2faspplus%2fdoc%2fwebservicetypes.aspx/>
the .NET framework DateTime ends up as an XML schema dateTime or date or
time.

The XML schema data types are defined here:
<http://www.w3.org/TR/xmlschema-2/#dateTime>
<http://www.w3.org/TR/xmlschema-2/#time>
Example XSD dateTime representation is e.g.
2006-01-27T15:49:00+01:00
that is
yyyy-mm-ddThh:mm:ss
and the part after that the time zone difference to UTC.

Simply look into the WSDL description of that .NET framework which
schema type is being used. And nowadays anyone using Java to consume a
web service certainly has tools that read the WSDL description and
generate the proper classes taking care of the SOAP serialization.

--

Martin Honnen --- MVP XML
AddThis Social Bookmark Button