ifElse + addDateTime issue

Hi,
i’m trying to utilize ifelse() function as follows, so i want basically add 1 day for specific dates but wit no result.

However addDateTime() works fine without ifelse(), so i’m wondering what could be the issue here.

Here’s the calculated field i’ve created created_at + 1 day :


ifelse

({created_at} = '2023-04-10',

addDateTime(1,'DD',{created_at} ),

{created_at}

)

Output:

image

Hi @Rad
works fine for me.
grafik

What format has you created_at?
Because i match the source format as in my source(file).

ifelse({Date} = '01/01/2023',addDateTime(1,'DD',{Date}),{Date})

BR

Hi @ErikG it’s retrieving from SQL in such format:

image

Maybe you can try something like

ifelse

(formatDate({created_at}, 'yyyy-MM-dd') = '2023-04-10',

addDateTime(1,'DD',{created_at} ),

{created_at}

)

@ErikG it’s working, thanks!

1 Like