System.DateTime.MaxValue Field

Represents the largest possible value of DateTime. This field is read-only.

Value: 12/31/9999 11:59:59 PM

Syntax

public static readonly DateTime MaxValue

Remarks

The value of this constant is equivalent to 23:59:59.9999999, December 31, 9999, exactly one 100-nanosecond tick before 00:00:00, January 1, 10000.

Some calendars, such as the System.Globalization.UmAlQuraCalendar, support an upper date range that is earlier than DateTime.MaxValue. In these cases, trying to access DateTime.MaxValue in variable assignments or formatting and parsing operations can throw an ArgumentOutOfRangeException. Rather than retrieving the value of DateTime.MaxValue, you can retrieve the value of the specified culture's latest valid date value from the System.Globalization.CultureInfo.DateTimeFormat.Calendar.MaxSupportedDateTime property.

Requirements

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