A string containing the format pattern for a long date value.
Type Reason ArgumentNullException The value specified for a set operation is a null reference. InvalidOperationException The current instance is read-only and a set operation was attempted.
The DateTimeFormatInfo.LongDatePattern property defines the culture-specific format of date strings that are returned by calls to the DateTime.ToString and DateTimeOffset.ToString methods and by composite format strings that are supplied the "D" standard format string. The following example illustrates the relationships among the following: the "D" standard format string, the custom format string returned by the DateTimeFormatInfo.LongDatePattern property, and the culture-specific representation of a date.
code reference: System.Globalization.DateTimeFormatInfo.LongDatePattern#2
See Custom Date and Time Format Strings for individual custom format specifiers that can be combined to construct custom format strings such as "dddd, dd MMMM yyyy".
You should set the date separator in the long date pattern to an exact string instead of using the date separator placeholder. For example, to obtain the pattern MM-DD-yyyy, set the long date pattern to "MM-DD-yyyy".
The value of this property may change if the calendar used by a culture changes. For instance, the following example shows how theDateTimeFormatInfo.LongDatePattern property of a System.Globalization.CultureInfo object that represents the Arabic (Syria) culture changes when the System.Globalization.Calendar object used by the culture changes.
code reference: System.Globalization.DateTimeFormatInfo.LongDatePattern#3