System.Globalization.DateTimeStyles Enum

public enum DateTimeStyles

Base Types

Object
  ValueType
    Enum
      DateTimeStyles

Assembly

mscorlib

Library

BCL

Summary

Defines the formatting options that customize how the System.DateTime.Parse(System.String) and System.DateTime.ParseExact(System.String,System.String,System.IFormatProvider) methods parse a string.

Description

[Note: See the String class for the list of white space characters.

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

]

Attributes

FlagsAttribute

See Also

System.Globalization Namespace

Members

DateTimeStyles Fields

DateTimeStyles.AdjustToUniversal Field
DateTimeStyles.AllowInnerWhite Field
DateTimeStyles.AllowLeadingWhite Field
DateTimeStyles.AllowTrailingWhite Field
DateTimeStyles.AllowWhiteSpaces Field
DateTimeStyles.NoCurrentDateDefault Field
DateTimeStyles.None Field
DateTimeStyles.value__ Field


DateTimeStyles.AdjustToUniversal Field

AdjustToUniversal = 0x10;

Summary

Specifies that the date and time must be converted to universal time coordinate time or Greenwich mean time (GMT)

See Also

System.Globalization.DateTimeStyles Enum, System.Globalization Namespace

DateTimeStyles.AllowInnerWhite Field

AllowInnerWhite = 0x4;

Summary

Specifies that extra white space characters not specified in the DateTimeFormatInfo format patterns are allowed.

See Also

System.Globalization.DateTimeStyles Enum, System.Globalization Namespace

DateTimeStyles.AllowLeadingWhite Field

AllowLeadingWhite = 0x1;

Summary

Specifies that leading white space characters are allowed.

See Also

System.Globalization.DateTimeStyles Enum, System.Globalization Namespace

DateTimeStyles.AllowTrailingWhite Field

AllowTrailingWhite = 0x2;

Summary

Specifies that trailing white space characters are allowed.

See Also

System.Globalization.DateTimeStyles Enum, System.Globalization Namespace

DateTimeStyles.AllowWhiteSpaces Field

AllowWhiteSpaces = AllowLeadingWhite | AllowTrailingWhite | AllowInnerWhite;

Summary

Specifies that white space characters anywhere in the string are allowed.

See Also

System.Globalization.DateTimeStyles Enum, System.Globalization Namespace

DateTimeStyles.NoCurrentDateDefault Field

NoCurrentDateDefault = 0x8;

Summary

Specifies 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 System.DateTime.Parse(System.String) or System.DateTime.ParseExact(System.String,System.String,System.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.

See Also

System.Globalization.DateTimeStyles Enum, System.Globalization Namespace

DateTimeStyles.None Field

None = 0x0;

Summary

Specifies that the default formatting options are to be used.

See Also

System.Globalization.DateTimeStyles Enum, System.Globalization Namespace

DateTimeStyles.value__ Field

value__;

See Also

System.Globalization.DateTimeStyles Enum, System.Globalization Namespace