Skip to main content
Question

TimeofDay Formatting

  • July 13, 2020
  • 0 replies
  • 75 views

I have a TimeOfDay field using 24 hour clock to track incidents. I simply would like to identify any time entered

between 00:00 to 10:00 = "Morning"
Between 10:01 to 13:00 = "Mid-day"
Between "13:01 to 17:00" = "Afternoon"
Between "17:01 to 24:00 = Evening

I am having trouble with the TimeofDay formula and Text formulas to use If/Case. Any ideas?
Thanks

------------------------------
Rob Salaj
------------------------------
This topic has been closed for replies.

MarkShnierYou
Forum|alt.badge.img+22
  • Quickbase Alumni
  • July 13, 2020
not tested but try this


var TimeOfDay TOD = [My time of day field];

IF(
$TOD >  ToTimeOfDay("12:01am") and $TOD <=  ToTimeOfDay("1:00 pm"), "Morning"
$TOD >  ToTimeOfDay("1:00 pm") and $TOD <=  ToTimeOfDay("5:00 pm"), "Afternoon",
$TOD >  ToTimeOfDay("5:00 pm") and $TOD <=  ToTimeOfDay("12:00 am"), "Evening",
IsNull($TOD, "", "Other")


------------------------------
Mark Shnier (YQC)
Quick Base Solution Provider
Your Quick Base Coach
http://QuickBaseCoach.com
mark.shnier@gmail.com
------------------------------