Dim dateString, format As String
dateString = "MM" & "/" & dd & "/" & yyyy & " " & HH & ":00"
dateString = dateString.Replace("-", "/")
Dim provider As CultureInfo = CultureInfo.InvariantCulture
format = "MM/dd/yyyy HH:mm:ss"
Try
fromdate = Date.ParseExact(dateString, format, provider)
Catch ex As FormatException
ShowAlert(ex.Message)
End Try
No comments:
Post a Comment