I have a text box (txtTime) that retrieves a user inputted value as time (ex. 3:00 PM). I have a field (StartTime) in my database of type time(7) to store this value in.
Unfortunately, I'm unable to convert the string from the textbox to this timespan value. Any help would be appreciated.
txtTime.Text is equal to 3:00 PM (the time can change), but the following doesn't work.
Timespan Time = Timespan.Parse(txtTime.Text);