Results 1 to 7 of 7

Thread: [RESOLVED] Is Current Time Between 9pm and 3am?

Threaded View

  1. #7
    PowerPoster
    Join Date
    Nov 2002
    Location
    Manila
    Posts
    7,629

    Re: [RESOLVED] Is Current Time Between 9pm and 3am?

    People often overlook day spanning when tackling duration, they often just consider duration within the day (often duration during daytime)... for intervals above consider them all in day zero, or a datetime variable with value from 0 to less than 1 (unit of measure of datetime data type is a day, decimal portion or less than 1 or part of a day is the time info)... so 3AM (day zero) can be created with datetime_variable = TimeSerial(3). 3AM the next day (plus one day) would be datetime_variable = 1 + TimeSerial(3).

    So you only needed to add 3AM the next day in your list of intervals using datetime data type, or you only needed to add to the list your same starting time but for the next day, in order to make the list span 24 hours. When time being considered is less than start time then just add 1 to it, it would then fall on last interval.
    Last edited by leinad31; Jun 19th, 2007 at 10:43 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width