using Intacct.SDK.Xml; IAXmlWriter writer = new IAXmlWriter(); writer.WriteStartElement("datetime"); writer.WriteDateSplitElements(DateTime.Now); writer.WriteEndElement(); string xmlOutput = writer.ToString();
using Intacct.SDK.Xml; IAXmlWriter writer = new IAXmlWriter(); writer.WriteStartElement("datetime"); DateTime customDateTime = new DateTime(2022, 01, 01, 10, 30, 0); writer.WriteDateSplitElements(customDateTime); writer.WriteEndElement(); string xmlOutput = writer.ToString();In both examples, the WriteStartElement method is used to start the XML element and the WriteEndElement method is used to end the XML element. The WriteDateSplitElements method is used to write the date-time value in separate elements for date and time. Package/library: Intacct.SDK.Xml.