Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

DateTime Properties

The properties of the DateTime structure are listed here. For a complete list of DateTime structure members, see the DateTime Members topic.

Public Properties

public propertyDate

Supported by the .NET Compact Framework.

Gets the date component of this instance.
public propertyDay

Supported by the .NET Compact Framework.

Gets the day of the month represented by this instance.
public propertyDayOfWeek

Supported by the .NET Compact Framework.

Gets the day of the week represented by this instance.
public propertyDayOfYear

Supported by the .NET Compact Framework.

Gets the day of the year represented by this instance.
public propertyHour

Supported by the .NET Compact Framework.

Gets the hour component of the date represented by this instance.
public propertyMillisecond

Supported by the .NET Compact Framework.

Gets the milliseconds component of the date represented by this instance.
public propertyMinute

Supported by the .NET Compact Framework.

Gets the minute component of the date represented by this instance.
public propertyMonth

Supported by the .NET Compact Framework.

Gets the month component of the date represented by this instance.
public propertystatic (Shared in Visual Basic)Now

Supported by the .NET Compact Framework.

Gets a DateTime that is the current local date and time on this computer.
public propertySecond

Supported by the .NET Compact Framework.

Gets the seconds component of the date represented by this instance.
public propertyTicks

Supported by the .NET Compact Framework.

Gets the number of ticks that represent the date and time of this instance.
public propertyTimeOfDay

Supported by the .NET Compact Framework.

Gets the time of day for this instance.
public propertystatic (Shared in Visual Basic)Today

Supported by the .NET Compact Framework.

Gets the current date.
public propertystatic (Shared in Visual Basic)UtcNow

Supported by the .NET Compact Framework.

Gets a DateTime that is the current local date and time on this computer expressed as the coordinated universal time (UTC).
public propertyYear

Supported by the .NET Compact Framework.

Gets the year component of the date represented by this instance.

See Also

DateTime Structure | System Namespace

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.