Time expression

Hi Everyone!

I have searched for an answer but with no luck.

I am trying to create an expression that allows the person filling out the form to not have to re-enter their passcode if it has been less than two minutes since the previous form entry was made.

Can anyone help?

Here is what is not working..

IFS(
AND(
[Most Recent].[Date]=[Date],[Most Recent].[Time]=[Time]-"00:00:01"),[Most Recent].[Operator Password],
AND(
[Most Recent].[Date]=[Date],[Most Recent].[Time]=[Time]-"00:00:02"),[Most Recent].[Operator Password]..................)

Any help greatly appreciated,

J

Solved Solved
0 2 119
1 ACCEPTED SOLUTION

First, I would recommend capturing the DateTime together.  It will help simplify the expression.

I will assume that the [Most Recent] column is the last time check.  The expression to validate the time, i.e. inserted into the Valid If, and is within the range of 2 minutes would be:

NOW() - [Most Recent] < "000:02:00"

 This assumes [Most Recent] is defined as DateTime.

Subtracting two DateTimes produces a DURATION result in the form of "hhh:mm:ss".  Duration literal values require 3 leading digits for AppSheet to identify it is a duration literal value.

I hope this helps!

View solution in original post

2 REPLIES 2

First, I would recommend capturing the DateTime together.  It will help simplify the expression.

I will assume that the [Most Recent] column is the last time check.  The expression to validate the time, i.e. inserted into the Valid If, and is within the range of 2 minutes would be:

NOW() - [Most Recent] < "000:02:00"

 This assumes [Most Recent] is defined as DateTime.

Subtracting two DateTimes produces a DURATION result in the form of "hhh:mm:ss".  Duration literal values require 3 leading digits for AppSheet to identify it is a duration literal value.

I hope this helps!

Hi WillowMobileSys,

Thank you very much for this solution, your answers to other peoples posts have helped me many times in the past also.

Changing to DateTime as recommended along with adding the extra 0 to the duration as said did the job perfectly.

Kind regards,

J

Top Labels in this Space