Reputation: 3023
In the .NET API for Windows Store Apps DateTimeFormatInfo does not include the properties DateSeparator and TimeSeparator. The reason is possibly that both allowed setting in the full API. But in case I need to get the current date or time separator (and I do), what could I possibly use instead?
Upvotes: 3
Views: 323
Reputation: 6104
You can use the DateTime format strings to get the info.
var dateSep = DateTime.Now.ToString("%/", dateTimeFormatInfo);
var timeSep = DateTime.Now.ToString("%:", dateTimeFormatInfo);
Upvotes: 8