DateAndTime.Today Property

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Returns or sets a Date value containing the current date according to your system.

Namespace:  Microsoft.VisualBasic
Assembly:  Microsoft.VisualBasic (in Microsoft.VisualBasic.dll)

Syntax

'Declaration
Public Shared ReadOnly Property Today As DateTime
public static DateTime Today { get; }

Property Value

Type: System.DateTime
Gets a Date value containing the current date according to your system.

Remarks

The Date data type includes time components. When returning the system date, Today sets all of these to 0, so the returned value represents midnight (00:00:00). When setting the system date, Today ignores the time components.

To access the current system date as a String, use the DateString property.

To get the current system time, use the TimeOfDay property.

Examples

This example uses the Today property to return the current system date.

Dim thisDate As Date
thisDate = Today

Version Information

Silverlight

Supported in: 5, 4, 3

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.