Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am getting an error with the below if statement.
if(DEP_ACCT_OPN_DT >= $(CurrentMonth) and DEP_ACCT_OPN_DT <= $(PreviousMonth)) as FirstMonth,
Note :CurrentMonth is a variable with value set as
date(floor(monthstart(Today()))) .
Many Thanks
Hi
Try like this
if(DEP_ACCT_OPN_DT >= Date(floor(monthstart(Today()))) and DEP_ACCT_OPN_DT <= Date(floor(MonthEnd(Today()))), 'CurrentMonth',
if(DEP_ACCT_OPN_DT >= Date(floor(monthstart(Today(),-1))) and DEP_ACCT_OPN_DT <= Date(floor(MonthEnd(Today(),-1))),'PreviousMonth',
if(DEP_ACCT_OPN_DT >= Date(floor(monthstart(Today(),-2))) and DEP_ACCT_OPN_DT <= Date(floor(MonthEnd(Today(),-2))), 'PREPreviousMonth'))) as Bucket
Thank you very much for all your help.It did work.Thanks !