Need to do this IFELSE calculation in Quicksight

Need to do this IFELSE calculation in Quicksight but its not working

Hi,
Can you explain what you [Rec Date] - 2 does? Are you subtracting 2 days from that date?
Thanks.

Yes. we need to substract 2 day from Rec Date

Oh ok.
Then you can use the addDateTime function. Your calculation will be:
ifelse({YourDateField} < ‘2022-03-07’, addDateTime(-2, ‘DD’, {yourDateField}), {YourDateField})

Thanks,
Asem.