Skip to Content
VB.NET Language in a Nutshell, Second Edition
book

VB.NET Language in a Nutshell, Second Edition

by Steven Roman PhD, Ron Petrusha, Paul Lomax
April 2002
Intermediate to advanced
688 pages
19h 51m
English
O'Reilly Media, Inc.
Content preview from VB.NET Language in a Nutshell, Second Edition

Name

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.

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

VB .NET Language in a Nutshell

VB .NET Language in a Nutshell

Steven Roman PhD, Ron Petrusha, Paul Lomax

Publisher Resources

ISBN: 0596003080Supplemental ContentCatalog PageErrata