In C #, if I wanted to parse a string into a date and time, I would do something similar to the following:
String input = "08:00";
DateTime time;
if (!DateTime.TryParse(input, out time))
{
return;
}
TimeSpan timeSpan = new TimeSpan(time.Hour, time.Minute, time.Second);
My Google-Fu was less desirable in finding a way to convert it to Objective-C.
Any suggestions?
source
share