Hello everyone! I have trying to complete an assignment where I have to convert a string from user input to all different US time zones and then display them. At first I tried doing this just by using math but it seemed extremely inefficient and messy so I was told to use the DateTime function which seems easier with the exception of one thing - I have found absolutely no examples of converting time to different time zones. I was able to take the string and convert it to UTC time thinking it would make it easier but now I don't know how to convert them to PST, EST, MST, or CST. I included the function below:
****************************
Private Sub timeDifference()
Dim meridiem As String
Dim ante As String = " AM"
Dim post As String = " PM"
Dim time As String = TextBox1.Text
Dim timeString As String = time & meridiem
Dim curTime As DateTime = CDate(timeString).ToUniversalTime
Label1.Text = curTime.ToShortTimeString
End Sub
****************************
Any help on this would be much appreciated.
****************************
Private Sub timeDifference()
Dim meridiem As String
Dim ante As String = " AM"
Dim post As String = " PM"
Dim time As String = TextBox1.Text
Dim timeString As String = time & meridiem
Dim curTime As DateTime = CDate(timeString).ToUniversalTime
Label1.Text = curTime.ToShortTimeString
End Sub
****************************
Any help on this would be much appreciated.