LET function

Good Morning, I have a bot with this formula,

"DATE(
CONCATENATE(
TEXT(MOD(MONTH([_THISROW].[inizio]) + SWITCH([_THISROW].[TipoRicorrente], "mensile", 1, "bimestrale", 2, "trimestrale", 3, "semestrale", 6, "annuale", 12, 1000) - 1, 12) + 1, "00"),
"/",
TEXT(DAY([_THISROW].[inizio]), "00"),
"/",
TEXT(YEAR([_THISROW].[inizio]) + FLOOR((MONTH([_THISROW].[inizio]) + SWITCH([_THISROW].[TipoRicorrente], "mensile", 1, "bimestrale", 2, "trimestrale", 3, "semestrale", 6, "annuale", 12, 1000) - 1) / 12), "0000")
)
)
<= [_THISROW].[fine]"

But expression editor says:

"TEXT function with two arguments requires a temporal type and text representing a date format"

Any suggestion? I must triyng another approach?

 

Solved Solved
0 1 685
1 ACCEPTED SOLUTION

As the error says two arguments with TEXT() functions work with date , datetime, time  values.

The way your expression is containing multiple arguments within TEXT(), I believe AppSheet is interpreting it as a two argument TEXT() function.

Suvrutt_Gurjar_0-1748952310355.png

TEXT() - AppSheet Help

 

Please try to remove wrapping by text and try the expression.

 

 

View solution in original post

1 REPLY 1

As the error says two arguments with TEXT() functions work with date , datetime, time  values.

The way your expression is containing multiple arguments within TEXT(), I believe AppSheet is interpreting it as a two argument TEXT() function.

Suvrutt_Gurjar_0-1748952310355.png

TEXT() - AppSheet Help

 

Please try to remove wrapping by text and try the expression.

 

 

Top Labels in this Space