String was not recognized as a valid TimeSpan
DataTable dt = new DataTable();
dt = database.getSchedule();
TimeSpan AMTime;
TimeSpan PMTime;
TimeSpan NNTime;
TimeSpan _timeNow = TimeSpan.Parse(timeNow);
foreach (DataRow row in dt.Rows)
{
AMTime = TimeSpan.Parse(row["AMIntake"].ToString());
PMTime = TimeSpan.Parse(row["PMIntake"].ToString());
NNTime = TimeSpan.Parse(row["NNIntake"].ToString());
if (AMTime == _timeNow || PMTime == _timeNow || NNTime == _timeNow)
{
MessageBox.Show("Drink Medicine");
}
else
{
/*do nothing*/
}