gMonthDay xsd type = string ?

  • Thread starter Michel Posseth [MCP]
  • Start date
M

Michel Posseth [MCP]

xsd:gMonthDay is a common type for dates , why is it mapped to a string
datatype when using wsdl.exe on a WSDL where it is defined as gMonthDay type

regards

Michel
 
M

Michel Posseth [MCP]

For those of you ever wondering the XSD types are strings and you can parse
them back and formward using the following code

Imports System.Runtime.Remoting.Metadata.W3cXsd2001


VB

Dim gMonthDay As SoapMonthDay = SoapMonthDay.Parse("--01-08")
MsgBox(gMonthDay.Value)

Dim gMonthDay2 As New SoapMonthDay(Now)

MsgBox(gMonthDay2.ToString)

C#

private void Test()

{

SoapMonthDay xsdMonthDay = SoapMonthDay.Parse("--01-08");

Interaction.MsgBox(xsdMonthDay.Value);

}



gMonthDay.Value returnds a date variabel





And the other way around



private void Test2()

{

SoapMonthDay xsdMonthDay = new SoapMonthDay(Now);



Interaction.MsgBox(xsdMonthDay.ToString);





}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top