|
|
System.Globalization.DateTimeStyles Enumeration |
|
|
Description | |
|
This is a misleadingly named enumeration, applying mostly to white space handling rather than date/time formatting.
When DateTime.Parse and DateTime.ParseExact convert a string representation of a date/time into a DateTime value, they can be made tolerant of clutter such as blank spaces in the string.
By default, the Parse method already applies all Allow* methods.
|
|
Values | |
|
None | | 0 | | Indicates that the default formatting options must be used. This is the default style for DateTime.Parse and DateTime.ParseExact. |
AllowLeadingWhite | | 1 | | Indicates that leading white space characters must be ignored during parsing, except if those white space characters occur in the DateTimeFormatInfo format patterns. |
AllowTrailingWhite | | 2 | | Indicates that trailing white space characters must be ignored during parsing, except if those white space characters occur in the DateTimeFormatInfo format patterns. |
AllowInnerWhite | | 4 | | Indicates that extra white space characters in the middle of the string must be ignored during parsing, except if those white space characters occur in the DateTimeFormatInfo format patterns. |
NoCurrentDateDefault | | 8 | | Indicates that, if the parsed string contains only the time and not the date, the DateTime.Parse and DateTime.ParseExact methods assume the Gregorian date with year |
AdjustToUniversal | | 16 | | Indicates that the date and time must be converted to Universal Time or Greenwich mean time (GMT). |
AllowWhiteSpaces | | 7 | | Indicates that extra white space characters anywhere in the string must be ignored during parsing, except if those white space characters occur in the DateTimeFormatInfo format patterns. This value is a combination of the AllowLeadingWhite, AllowTrailingWhite, and AllowInnerWhite values. |
|
Delphi Basics links | |
|
|
Microsoft MSDN links | |
|
|
|
|
|
|