I want to display date and time on top of the form where normlly written form1 forms name

i want to display date in formate of for example 23 August 2010

and time in this formate 12:33:20AM

Please please help.

Thanks its woking but now it replaces form name how can i display both the form name and date and time.

Please please help thanks for your kind support and help.

How is it adding the date and time to your Form's Title? Me.Text=""?

Have you tried adding the name of your Form's title first, followed by & and the code I have provided?

Public Class Form1

    Private WithEvents myTimer As New Timer With {.Interval = 1000, .Enabled = True}

    Private Sub myTimer_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles myTimer.Tick
        Me.Text = "Cool little Title - " & Date.Now.ToLongDateString & " - " & TimeOfDay
    End Sub
End Class

see 1st take Timer from toolbox & then write blow mention code & date format u can change as per your requirement ok if u still have any doubt u can ask me ok

Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Timer1.Start()
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Me.Text = "title wich you want write here " & Now.ToUniversalTime
End Sub
End Class

I want to display date and time on top of the form where normlly written form1 forms name

i want to display date in formate of for example 23 August 2010

and time in this formate 12:33:20AM

Please please help.

Edited 6 Years Ago by krunal1089: n/a

This question has already been answered. Start a new discussion instead.