It looks to me like this formatting is doing the exact same thing that dt.ToString("s") would do. It is a culture invariant standard format build in to .Net, and thus there is no need for char escaping and such? http://msdn.microsoft.com/en-us/library/az4se3k1.aspx (look for SortableDateTimePattern)