changing the time looks on form

wxman11

Member
Joined
Nov 16, 2011
Messages
6
Programming Experience
Beginner
after adding 3 hours from the local for the 3rd timer, how can i get it to look like timer2 once i debug? Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Label1.Text = TimeOfDay.UtcNow.ToString("dd/MMM?yyy HH:mm:ss")


Private
Sub Timer2_Tick(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles Timer2.Tick
Label2.Text = Date.now.tostring("dd/MMM/yyyy HH:mm:ss")



below once i debug, it gives me, 07:07:15 AM i don't want that, i want it to show like the others?
Private Sub Timer3_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer3.Tick
Label6.Text = Now.AddHours(3)
 
Um, the third one looks different to the other two, so what is different about the third code snippet compared to the other two? Is not the fact that you are not calling ToString in the third case not a glaring difference?
 
yes, the third one is different because for that timer, the city (Lima, Peru) is 3 hrs ahead of San Francisco. the 1st to, i was able to have the time displayed how it is shown in the code. nevertheless, i figured it out. the code ended up being:

label6.text = now.addhours(3).tostring("HH:mm:ss")
 
Back
Top