I'm sending 2 very similar SMSs on a journey and one of them is not working properly. When I preview it, it gives me this error:
Invalid value specified for function parameter. Function Name: DateAdd Parameter Name: InputDate Parameter Ordinal: 1 Parameter Type: Date Submitted Value: ClientID: 110008019 JobID: 0 ListID: 0 BatchID: 0 SubcriberID: 0 Data Source Type: CustomObject Data Source ID: 07e90d92-24f9-eb11-a304-48df37342d01
Since they are so similar, I don't know what could be causing the issue. Here are the codes for them:
SMS #1 (working fine):
%%[
VAR @hoje, @datalimite
SET @hoje = Now()
SET @datalimite = DateAdd(@hoje, 12, "D")
InsertData("DE_TESTE_2WAY_AUM_LIMITE",DIA_ENTRADA,@hoje)
]%%
**Other displayed text** Condicoes validas ate %%=Format(@datalimite, "dd/MM")=%%.
SMS #2 (not working correctly):
%%[
VAR @dataentrada, @datalimite
SET @dataentrada = Lookup("DE_TESTE_2WAY_AUM_LIMITE","DIA_ENTRADA","CELULAR",MOBILE_NUMBER)
SET @datalimite = DateAdd(@dataentrada, 8, "D")
]%%
**Other displayed text** Condicoes validas ate %%=Format(@datalimite, "dd/MM")=%%.
I tried removing the DateAdd
function and it works. I also tried displaying the @dataentrada
field and it also works.