samedi 14 mars 2015

c# howto subract 5mins time this "4:30 pm" string


Vote count:

0




I have a problem declaring a time variable with a value of 5 minutes and i want to use this variable to subtract to 4:30 pm string. but i dont know how do i declare that variable. is there an easy way to subract that "4:30 pm string"



while (reader.Read())
{
AMSetTime = (reader["AMOutTime"].ToString());
PMSetTime = (reader["PMOutTime"].ToString());
}

TimeSpan timeUpdateCount = DateTime.Parse(PMSetTime).TimeOfDay;
TimeSpan minusFiveMinutes(00:05); //Error here


asked 11 secs ago







c# howto subract 5mins time this "4:30 pm" string

Aucun commentaire:

Enregistrer un commentaire