Date arithmetic expression has an invalid operator

My equation is date-date/7 it seems it does not like to divide by 7 though. I am having issues running this expression in appsheet, I do believe it works in google sheets. Iโ€™ve tried changing the value from number to duration in appsheet with no luck. I still get invalid operator error

Solved Solved
0 5 1,075
1 ACCEPTED SOLUTION

Subtraction operations between 2 values of any Date, Time, or DateTime Types produces a Duration Type. You cannot simply divide a Duration type. It looks like youโ€™re wanting to calculate a number of weeks. Try:

TOTALHOURS( [date] - [date] ) / ( 7 * 24 )

And read this article thoroughly:

View solution in original post

5 REPLIES 5
Top Labels in this Space