I'm writing a script to generate XML for SOAP requ...
# suitescript
k
I'm writing a script to generate XML for SOAP requests to an external API. One of the external API fields is a datetime string, but it's serialized in a format that is parsed on the other end by I think C# using
System.Xml.Serialization.XmlCustomFormatter.ToDateTime
. Is there a built in SS2.0 function to format datetime values for XML serialization?
s
if the SOAP api supports a schema (which it should) then it should indicate the type for that date, which in turn should tell you how it should be serialized
k
ah ok
I figured it out by trial and error anyway. 😆
s
usually that ends up meaning ISO8601 style dates, e.g. YYYY-MM-DD?