Dim myCoolTimeDate As String = Format(DateTime.Now, "hh:mm:ss tt MM/dd/yy")
MsgBox(myCoolTimeDate)
codeorder
Posting Virtuoso
1,915 posts since Aug 2010
Reputation Points: 255
Solved Threads: 384
for time:
textbox1.text = TimeOfDay.ToShortTimeString
for date:
Today.ToShortDateString()
Netcode
Veteran Poster
1,021 posts since Jun 2009
Reputation Points: 43
Solved Threads: 67
Dim dtTest As New Date()
Dim test As String = "12:52:17 PM 11/16/10"
Dim result As Boolean
result = Date.TryParse(test, dtTest)
Me.Label1.Text = dtTest.ToString
This will convert it with the Date first, then the time. Is that ok or do you need the time first?
jbrock31
Junior Poster in Training
79 posts since Oct 2008
Reputation Points: 22
Solved Threads: 16
simply use:
Textbox1.text = Now.Date
Netcode
Veteran Poster
1,021 posts since Jun 2009
Reputation Points: 43
Solved Threads: 67