Public Class Form1
Private Sub btnShowDate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnShowDate.Click
Dim dteResults As Date
dteResults = Now
MessageBox.Show(dteResults.ToString, "默认格式")
MessageBox.Show(dteResults.ToLongDateString, "长日期格式")
MessageBox.Show(dteResults.ToShortDateString, "短日期格式")
MessageBox.Show(dteResults.ToLongTimeString, "长时间格式")
MessageBox.Show(dteResults.ToShortTimeString, "短时间格式")
End Sub
Private Sub btnDateProperties_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDateProperties.Click
Dim dteResults As Date
dteResults = Now
Message