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.
<cXML payloadID="accountsuser@bla.com"
timestamp="2011-06-09T16:37:17+16:37">
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Use the “o” format specifier – read about this one in the standard Date and Time format strings documentation on MSDN.
And:
If this is not what you want, you will need to use a custom format string – I believe you will need to do this, as the offset is not standard.