using System;using System.Xml;class Example{ static void Main() { DateTimeOffset dto; dto = DateTimeOffset.Now; string timeAsString = XmlConvert.ToString(dto); Console.WriteLine(timeAsString); }}