This is my input:
55
This is my desired output:
PT55H
Is there a built in class in C# that converts a timespan as: TimeSpan.TryParse(55) or as a string “55” with hours into an ISO8601 formatted string?
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.
Coworker just found this for me:
It seems to convert it to
PT2D7H, but since I’m usingXMLConvert.ToTimeSpan().TotalHourselsewhere, it shouldn’t cause any problems!