What does a single quote inside a C# date time format mean?

asked6 years ago
last updated6 years ago
viewed4.1k times
Up Vote57Down Vote

We have e.g. this constant in C#:

System.Globalization.DateTimeFormatInfo.InvariantInfo.SortableDateTimePattern

It has this value:

"yyyy'-'MM'-'dd'T'HH':'mm':'ss"

I do use it in the ParseExact function and then yyyy-MM-ddTHH:mm:ss works as well.

I cannot figure out what the single quotes are for.