DateTime Properties
MSDN Home
MSDN
MSDN Library
.NET Development
.NET Framework 3.5
.NET Framework Class Library
System Namespace
DateTime Structure
DateTime Properties
Date Property
Day Property
DayOfWeek Property
DayOfYear Property
Hour Property
Kind Property
Millisecond Property
Minute Property
Month Property
Now Property
Second Property
Ticks Property
TimeOfDay Property
Today Property
UtcNow Property
Year Property
DateTime Structure
DateTime Members
DateTime Constructor
DateTime Fields
DateTime Methods
DateTime Properties
Switch View :
Classic
Lightweight Beta
ScriptFree
Feedback
.NET Framework Class Library
DateTime Properties
The
DateTime
type exposes the following members.
Properties
Name
Description
Date
Gets the date component of this instance.
Day
Gets the day of the month represented by this instance.
DayOfWeek
Gets the day of the week represented by this instance.
DayOfYear
Gets the day of the year represented by this instance.
Hour
Gets the hour component of the date represented by this instance.
Kind
Gets a value that indicates whether the time represented by this instance is based on local time, Coordinated Universal Time (UTC), or neither.
Millisecond
Gets the milliseconds component of the date represented by this instance.
Minute
Gets the minute component of the date represented by this instance.
Month
Gets the month component of the date represented by this instance.
Now
Gets a
DateTime
object that is set to the current date and time on this computer, expressed as the local time.
Second
Gets the seconds component of the date represented by this instance.
Ticks
Gets the number of ticks that represent the date and time of this instance.
TimeOfDay
Gets the time of day for this instance.
Today
Gets the current date.
UtcNow
Gets a
DateTime
object that is set to the current date and time on this computer, expressed as the Coordinated Universal Time (UTC).
Year
Gets the year component of the date represented by this instance.
Top
See Also
Reference
DateTime Structure
System Namespace
Tags :