title: Specifying DateTime.ToString("o") decimal precision
body: <p>I have a DateTime object which I'm trying to output into an xml file in an ISO 8601 compliant format for transmission between two systems - we have no control over the recipient. The .net <a href="https://docs.microsoft.com/en-us/dotnet/standard/base-types/standard-date-and-time-format-strings#Roundtrip" rel="nofollow noreferrer">round trip format</a> satisfies this requirement for the most part, however forces the precision to 7dp.</p>
  
  <p>Is there a way I can specify this? eg something like <code>"o:0"</code> to omit the milliseconds decimal places completely or <code>"o:3"</code> to set it to 3dp instead. I know I can format the output myself with <code>yyyy'-'MM'-'dd'T'HH':'mm':'ssK</code> (or <code>yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffK</code> respectively) as a custom format specifier to control the decimal places if necessary, but wanted to see if I missed a way to simply pass the decimal precision to the <code>"o"</code> format specifier.</p>