I have a WP8 app, which will send the current time to a web service.
I get the datetime string by calling
DateTime.ToString(\"MM/dd/yyyy HH:mm:ss.ff
: has special meaning: it is The time separator. (Custom Date and Time Format Strings).
Use \ to escape it:
DateTime.ToString(@"MM/dd/yyyy HH\:mm\:ss.fff")
Or use CultureInfo.InvariantCulture:
DateTime.ToString("MM/dd/yyyy HH:mm:ss.fff", CultureInfo.InvariantCulture)
I would suggest going with the second one, because / has special meaning as well (it is The date separator.), so you can have problems with that too.