Trouble adding durations in a single expression

Note: Since writing this, I have learned that it isn’t a bug . . . I just didn’t know how to go about building the expression properly. I’m leaving it up in the hope that it may be useful to someone else who encounters a similar problem.


Today I’d like to report a bug I encountered while trying to come up with a solution regarding how to “round” times. Here’s a link to my original post:

Here’s the bug I found:

concatenate(hour(7:26:58),":",minute(7:26:58),":00")+(if(SECOND(7:26:58)>29,000:01:00,000:00:00))

produces the following error:

This is odd because the two parts work if they are placed in separate “Duration” columns:

Column 1

concatenate(hour(7:26:58),":",minute(7:26:58),":00")

Column 2

if(SECOND(7:26:58)>29,000:01:00,000:00:00)

Column 3 adds the first two columns together. The result is 07:27:00.

However, AppSheet doesn’t let me put the first two expressions together in one expression.

The error says something about “inputs of an invalid type ‘Unknown’” but even if I start with a valid duration expression and then try to past the more complicated expression in, I get the same error. I’ve tried using quotation marks, using TEXT(), to circumvent the error the only why I’ve gotten the expression to work is by dividing it into separate duration columns and then adding those. Surely, this can’t be the way AppSheet is intended to function.

My hunch is that AppSheet is a little too “user friendly.” In other words, I suspect it is “overanalyzing” my expression and flagging it as no good when, if fact, there is nothing wrong with it. Just my guess, though.

1 1 378
1 REPLY 1

Thanks to @Suvrutt_Gurjar for pointing me toward a solution:

Top Labels in this Space