I\'m trying to generate timestamp for cXML as shown below. Is there any function in C# which I can use to format date time to: 2011-06-09T16:37:17+16:37
e.g.
You can use ToString method
DateTime time = DateTime.Now; string format = "MMM ffffd d HH:mm yyyy"; // or any format you want Console.WriteLine(time.ToString(format));