ClassMicrosoft.VisualBasic.DateAndTime SyntaxDim result As String = DateAndTime.DateString or: DateAndTime.DateString = newDate
DescriptionThe DateString property gets or sets the current system date. The first syntax returns a string representing the current system date in the "MM-dd-yyyy" format. The second syntax sets the current system date using a string that is in a culture-independent format. Usage at a Glance
Version DifferencesThe DateString property is new to VB under .NET. It is a replacement for the VB 6 Date statement, which sets the system date, and the Date and Date$ functions, which retrieve the system date. See AlsoFormat Function, Now Property, TimeString Property, Today Property |