top of page

The Code

​

 

 

 

Public Class Form80

​

    '## 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.3 Formatting Date and Time using Predefined Formats

    
   Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click

​

        '## Format Date & Time in (Now) = Current Date ##

        Label2.Text = Format(Now, "General Date")
       
Label3.Text = Format(Now, "Long Date")
       
Label4.Text = Format(Now, "Short Date")
       
Label5.Text = Format(Now, "Long Time")
       
Label6.Text = Format(Now, "Short Time")

​

    End Sub

​

    Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click

​

        Label2.Text = ""
       
Label3.Text = ""
       
Label4.Text = ""
       
Label5.Text = ""
       
Label6.Text = ""


    End Sub

​

    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click

​

        Form73.Show()

          Me.Close()

​

    End Sub


End Class

​

Website Links-173.jpg
bottom of page