DateTimeOffset::Date Property
Gets a DateTime value that represents the date component of the current DateTimeOffset object.
Assembly: mscorlib (in mscorlib.dll)
Property Value
Type: System::DateTimeA DateTime value that represents the date component of the current DateTimeOffset object.
This property removes any significant part of the time component from a DateTimeOffset object and returns only its significant date component. For example, if the DateTimeOffset object has a date and time value of "1/12/07 4:01pm +7:30", the property returns a DateTime value of "1/12/07 12:00:00 AM". The DateTime value can then be displayed by using any of the standard or custom format specifiers that display dates only. (See the Example section for an illustration.)
The value of the DateTime::Kind property of the returned DateTime object is always DateTimeKind::Unspecified. It is not affected by the value of the Offset property.
To display a date without its time component, you can also use the "D" or "d" format specifiers; for an illustration, see the Example section.
Available since 8
.NET Framework
Available since 2.0
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1