code to check if in time interval pass midnight

  • Thread starter Thread starter greg chu
  • Start date Start date
G

greg chu

Hi, not sure who has done this.

I want to set up a time interval that could be pass midnight. so
people can enter

8AM to 8AM (pass midnight to 2nd day)
8AM to 2 AM (pass midnight to 2nd day)
8AM to 2 PM

The have code to check if the time is in interval.

Any one has a good idea?

Thanks

Greg
 
greg said:
I want to set up a time interval that could be pass midnight. so
people can enter

8AM to 8AM (pass midnight to 2nd day)
8AM to 2 AM (pass midnight to 2nd day)
8AM to 2 PM

If it helps, what you're actually doing it looking to see whether the end
time is earlier than (or equal to) the start time. If it is, the time period
passes midnight.
 
Back
Top