Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Jul 2002
    Posts
    436
    Thanks
    1
    Thanked 0 Times in 0 Posts

    between hours. if statement

    Code:
    thisHour=#23:00:00#
    if (thisHour<#16:00:00# and thisHour>#13:00:00#) or (thisHour>#22:00:00# and thisHour<#06:00:00#) then
    hours that are between 13:00-16:00 make the if return true
    but hours between 22:00-06:00 make it return false.

    why is that?

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    Zwolle, The Netherlands
    Posts
    1,120
    Thanks
    2
    Thanked 31 Times in 31 Posts
    it wouldnt surprise me if you had to check for
    thisHour>#22:00:00# and thisHour<#24:00:00#
    or
    thisHour>#00:00:00# and thisHour<#06:00:00#
    I am the luckiest man in the world

  • #3
    Regular Coder
    Join Date
    Jul 2002
    Posts
    436
    Thanks
    1
    Thanked 0 Times in 0 Posts
    that's was it
    thanks.


  •  

    Posting Permissions

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