DateString Property

   
DateString Property

Class

Microsoft.VisualBasic.DateAndTime

Syntax

 DateString(  ) 

Return Value

A String representing the current system date

Description

Returns or sets a string representing the current system date in the format "mm-dd- yyyy"

Rules at a Glance

The allowed formats for setting the date are "m-d-yyyy," "m-d-y," "m/d/yyyy," and "m/d/y."

Programming Tips and Gotchas

  • To get or set the current system time as a String, use the TimeString property.

  • To access the current system date as a Date, use the Today property.

VB.NET/VB 6 Differences

The DateString property is new to VB.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 Also

Now Property, TimeString Property, Today Property

   


VB.Net Language in a Nutshell
VB.NET Language in a Nutshell
ISBN: B00006L54Q
EAN: N/A
Year: 2002
Pages: 503

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net