Shane Partridge
Visual Basic 2013
The Code
Public Class Form82
'## There are Two Types of Format Functions for Date & Time ##
'## One of them is the built-in or Pre-Defined Format ##
'## While the other one can be Defined by the User ##
'## 19.4 The Syntax of a User-Defined Format for Date & Time : ##
'## Format (Expression, Style)
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
'## Format Date & Time in (Now) = Current Date ##
'## User-Defined Expression ##
'## Syntax = Format (Expression, Style) ##
'## M for Month is displayed as a Capital Letter ##
Label1.Text = Format(Now, "M")
Label2.Text = Format(Now, "MM")
Label3.Text = Format(Now, "MMM")
Label4.Text = Format(Now, "MMMM")
Label5.Text = Format(Now, "dd/MM/yyyy")
Label6.Text = Format(Now, "MMM,d,yyyy")
Label7.Text = Format(Now, "h:mm:ss tt")
Label8.Text = Format(Now, "MM/dd/yyyy h:mm:ss tt")
End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
Label1.Text = ""
Label2.Text = ""
Label3.Text = ""
Label4.Text = ""
Label5.Text = ""
Label6.Text = ""
Label7.Text = ""
Label8.Text = ""
End Sub
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
Form81.Show()
Me.Hide()
End Sub
End Class