Comparing Dates
Posted: Fri Sep 04, 2015 8:34 pm
I am having trouble comparing system variables as dates. Basically I have two variables dx1c and dx10c. I need to display one of them depending on some date logic. The date logic is as follows:
if the df(date from) is before 10/01 and the dt (date thru) is after 10/1 I need to choose dx1c.
if the df is after 10/01 I need to choose dx101c
if the dt if before 10/01 I need to choose dx1c
What I have currently doesn't work. Any suggestions?
{IIF ((PoC.dt >= "10/01/2015" && PoC.df <= "10/01/2015"),PoC.dx1c, IIF ((PoC.df >= "10/01/2015"), PoC.dx101c,PoC.dx1c))}
if the df(date from) is before 10/01 and the dt (date thru) is after 10/1 I need to choose dx1c.
if the df is after 10/01 I need to choose dx101c
if the dt if before 10/01 I need to choose dx1c
What I have currently doesn't work. Any suggestions?
{IIF ((PoC.dt >= "10/01/2015" && PoC.df <= "10/01/2015"),PoC.dx1c, IIF ((PoC.df >= "10/01/2015"), PoC.dx101c,PoC.dx1c))}