Answers for "time to string"

0

time to string

Dim strTime As String = "3:00 PM"

' Convert to datetime

Dim dtTime As DateTime = Convert.ToDateTime(strTime)
' Display in 24hr format

Response.Write(dtTime.ToString("HH:mm"))
Posted by: Guest on June-21-2021

Browse Popular Code Answers by Language