Duration/Number triggers "invalid operator" error

Har
Bronze 3
Bronze 3

Trying to do a simple expression which seems to be straight forward in the appsheettraining samples and training. Need to calculate the price for a task: [Hours] * [HourlyRate]. However, I'm getting "has an invalid operator" error. Hours are calculated for "duration": ([EndTime]-[StartTime]). When I change from duration to decimal, the price error goes away, but get "app formula 'Duration' does not match the column type"; the same if using "number". All of this particlar work is on the same table.

Solved Solved
0 2 132
1 ACCEPTED SOLUTION

Steve
Platinum 4
Platinum 4

Duration is not a numeric value. You'll need to use TOTALSECONDS()TOTALMINUTES(), or TOTALHOURS() to convert a Duration value to a numeric value.

Date and time expressions - AppSheet Help

Search results - AppSheet Help

View solution in original post

2 REPLIES 2

Steve
Platinum 4
Platinum 4

Duration is not a numeric value. You'll need to use TOTALSECONDS()TOTALMINUTES(), or TOTALHOURS() to convert a Duration value to a numeric value.

Date and time expressions - AppSheet Help

Search results - AppSheet Help

Har
Bronze 3
Bronze 3

Thank you

Top Labels in this Space