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.

Re: Date Time 80 80
Me.Text = Date.Now.ToLongDateString & " - " & TimeOfDay
Re: Date Time 80 80

where should i write this line of code to get date and time on top of the form?

Re: Date Time 80 80

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.

Re: Date Time 80 80

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?

Re: Date Time 80 80

Sorry i didn't understand you please provide me example

Re: Date Time 80 80
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
Re: Date Time 80 80

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.