Users Pricing

forum

home / developersection / forums / how to parse string contains time of day in c#?

How to parse string contains time of day in c#?

Anonymous User 2598 10 Nov 2014

I try to cast a string to time span but i get the following exception :

Input string was not in a correct format.

My code :

rad_from_time.SelectedTime = TimeSpan.Parse(pro[0].FromTime)

pro[0].FromTime = "1:00 AM";


I am a content writter !


1 Answers