Trying to compare a given Time between two times to see if it\'s within the those intervals. e.g. if given Time is 00:00 I need to find out if it falls between 21:00:00 to
Not sure why timespan is not working for you.
I tried this sample in my POC application and it worked.
DateTime t1 = DateTime.Now; DateTime t2 = DateTime.UtcNow; t1.TimeOfDay.CompareTo(t2.TimeOfDay);
Try this hope it will solve the problem.