Mono Class Library: System.Globalization Namespace

System.Globalization.DateTimeStyles Enumeration

Defines the formatting options that customize how the DateTime.Parse(string) and DateTime.ParseExact(string, string, IFormatProvider) methods parse a string.
[System.Flags]
[System.Runtime.InteropServices.ComVisible(true)]
public enum DateTimeStyles

Remarks

Note:

See the string class for the list of white space characters.

Only the DateTimeStyles.NoCurrentDateDefault option affects the DateTime.Parse(string) method. DateTime.Parse(string) always ignores leading, inner, and trailing white spaces.

Members

Member NameDescription
AdjustToUniversalSpecifies that the date and time must be converted to universal time coordinate time or Greenwich mean time (GMT)
AllowInnerWhiteSpecifies that extra white space characters not specified in the System.Globalization.DateTimeFormatInfo format patterns are allowed.
AllowLeadingWhiteSpecifies that leading white space characters are allowed.
AllowTrailingWhiteSpecifies that trailing white space characters are allowed.
AllowWhiteSpacesSpecifies that white space characters anywhere in the string are allowed.
AssumeLocalDocumentation for this section has not yet been entered.
AssumeUniversalDocumentation for this section has not yet been entered.
NoCurrentDateDefaultSpecifies that there is no current date default. If a string contains only the time and not the date, and this option is used with the DateTime.Parse(string) or DateTime.ParseExact(string, string, IFormatProvider) methods, a Gregorian year 1, month 1, day 1 date is assumed. In all other cases the methods assume the current local system date.
NoneSpecifies that the default formatting options are to be used.
RoundtripKindDocumentation for this section has not yet been entered.

Requirements

Namespace: System.Globalization
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0