0

Formula with calculation between two different times

I want to make a different text for each hour, and then make the text coloured red when the hour (now) is in between a chosen time.
What is wrong with this example?

Example:

if time(now()) > time(9.59) and time(now()) < time(10.59) then
    "Yes, the hour is in between 10 and 11"
else
    "No"
end

6 replies

null
    • Fred
    • 1 yr ago
    • Reported - view

    Try these changes:

    if time() > time(9,59) and time() < time(10,59) then
        "Yes, the hour is in between 10 and 11"
    else
        "No"
    end
    

    Check out this post in the Ninox docs for tips on the time function.

      • Producer, Manager
      • Jan_Inge_Iversen
      • 1 yr ago
      • Reported - view

      Fred 
      Thanks for replay.
      I had already done that, but it didn't help.

      • Fred
      • 1 yr ago
      • Reported - view

      weird. it works for me. 

      can you post a sample of your DB?

      • Producer, Manager
      • Jan_Inge_Iversen
      • 1 yr ago
      • Reported - view

      Fred 
      Maybe it's because I use the App and not the web-version?

      • Fred
      • 1 yr ago
      • Reported - view

      i use the app as well. 

    • Producer, Manager
    • Jan_Inge_Iversen
    • 1 yr ago
    • Reported - view

    Okay, then I must go through it all over again.
    I will get back to you straight when I get time, and will post a sample of my DB.
    Thanks a lot for your time, I appreciate it! 👍🙂

Content aside

  • 1 yr agoLast active
  • 6Replies
  • 205Views
  • 2 Following