Help with DateTime Comparer

Feb 12 2010 5:51 AM

Hi all
I have 4 dates as follows:
Date1: 08/11/2010 12:00:00
Date2: 08/11/2010 12:10:00
Date3: 08/11/2010 12:20:00
Date4: 08/11/2010 12:30:00
The DateTimeNow is equal to 08/11/2010 12:11:10


The four dates correspond to observations times, that is times which observations should be carried out.
I need to get the highest priority observation time. If an observation is late like Date1 and Date2 I need to return Date1 as it is the latest. If all observations are still due I need to return the next soonest observation.
Any help with this would be appreciated, been racking my brains for a while trying to get my head around it.
Regards

Answers (3)