Hello,
How I can make a rule to appear a message if the time out of working hours( from 8 to 4)
Best answer by Chris_Ben
View originalHello,
How I can make a rule to appear a message if the time out of working hours( from 8 to 4)
Best answer by Chris_Ben
View originalHere’s one way of doing it.
Basically you grab the hour component from your date/time control and check to see if it’s earlier than 8 or after 16. If it’s 16 you also need to check the minutes are not more than 0.
For ease of readability I’ve split it into 3 form variables.
Create an integer form variable called “Hour”:
convertToNumber(formatDate([Form].[Datetime],"HH"))
Create an integer form variable called “Minutes”:
convertToNumber(formatDate([Form].[Datetime],"mm"))
Create a boolean form variable called “Outside work hours”:
ifElse([Form].[Hour]<8||[Form].[Hour]>16,
true,
ifElse([Form].[Hour]==16&&[Form].[Minutes]>0,
true,
false))
Now you can write a submit rule:
Hello,
from where I get
[Form].[Datetime]
thank you very much
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.