Link to home
Start Free TrialLog in
Avatar of Rowel Virgo
Rowel VirgoFlag for Philippines

asked on

How about this?

 Private Sub timSAVE_Tick(sender As Object, e As EventArgs) Handles timSAVE.Tick
lblTIMEDATE.Text = DateTime.Now.ToString("yyyy/MM/dd") - 1 day???????
End Sub

Open in new window

I need to display the previous day(s)
is this possible? Thanks.
Avatar of John Tsioumpris
John Tsioumpris
Flag of Greece image

Something lie this ?
Public Module Module1
	Public Sub Main()
		Dim s as String				
		s = DateTime.Now.AddDays(-1)
		Console.WriteLine(s)
	End Sub
End Module

Open in new window

Avatar of Rowel Virgo

ASKER

in module?
ASKER CERTIFIED SOLUTION
Avatar of John Tsioumpris
John Tsioumpris
Flag of Greece image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks but im trying to change the format and I can't
("MM/DD/YYYY")
Dim sed As String
        sed = DateTime.Now.ToString("dd")
        Label148.Text = DateTime.Now.ToString("MM/") & sed - 1 & "/" & DateTime.Now.ToString("yyyy")
I play the codes
I got what I want! Thank you sir

Dim sed As String
 sed = DateTime.Now.ToString("dd")
 Label148.Text = DateTime.Now.ToString("MM/") & sed - 1 & "/" & DateTime.Now.ToString("yyyy")

Open in new window


User generated image