Date format in Quicksight

i am doing a ifelse statement in Quicksight, and i would like to set a condition where my order date is greater than 1st Jan of next year but less than 31st Dec of next year (where ‘next year’ will reflect as current year +1).

In excel, I can define 1st Jan of next year as follows:
=DATE(YEAR(NOW())+1,1,1)

I am trying to find out what is the equivalent in Quicksight?

Appreciate your help :slight_smile: thanks!

Hello @imevil,

Welcome to the Quick Sight Community, it is great having you here.

Can you try the following?

addDateTime(1, 'YYYY', truncDate('YYYY', now()))

cool! it works! I get the value of 1st Jan 2025.

if i want it it to be 31st Dec of next year, does this mean i have to repeat this to reflect +12 of “MM” and +31 of “DD”?

You could use

addDateTime(-1,'DD',addDateTime(2, 'YYYY', truncDate('YYYY', now())))