Skip to main content

Hi,

I have a Start Date/Time and and End Date/Time on a form.   I would like to validate that the Start and End Time are within business hours (i.e. 9am - 5pm).    Does anyone know how I would do that?

 

Thanks!Date/Time

What type of form are you using ? (Classic, Responsive or New Responsive)

If you have a New Responsive form and you use 24 hours format. You could do something like:



 



Create a variable: StartTime - Type String: 
formatDate([Form].[dtStart],"HH")




Create a form rule: Business hours:



if convertToNumber([Form].[StartTime]) >= 9 and



   convertToNumber([Form].[StartTime]) <= 17



Then do something like:



Label1 value is:  Business hours



Else
Label1 value is: Outside business hours



 




Reply