Skip to main content
Question

Formula check box that is check during the hours of 8am-8pm Mon-Fri

  • March 23, 2020
  • 0 replies
  • 37 views

Forum|alt.badge.img+6
I need a checkbox to help communicate the right message according to our hours of operation. Has anyone created anything like this?

------------------------------
Kelly
------------------------------
This topic has been closed for replies.

Forum|alt.badge.img+15
  • Registered
  • March 23, 2020
Kelly,

You are going to have to play with the time variable based upon your time zone but this should do the trick.

// Day Variable
var number NumDay = DayOfWeek(Today());
var bool MonToFri = Case($NumDay,
0,false,
1,true,
2,true,
3,true,
4,true,
5,true,
6,false);

// Time Variables
var timeofday CurrentTime = ToTimeOfDay(Now());
var bool EightToEight = If ( ToTimeOfDay("8:00AM")<$CurrentTime and ToTimeOfDay("8:00PM")<$CurrentTime,true, false );

// Formula Check Box
If ( $MonToFri=true and $EightToEight=true, true, false)

------------------------------
Don Larson
Paasporter
Westlake OH
------------------------------