Comparison of two dates
Posted: Thu Apr 30, 2015 6:35 am
Hi
i have two dates in my report. ASOF_DATE1 and ASOF_DATE2. I need to compare the dates in such manner that ASOF_DATE1 is less then or equal to 1 year prior to current month date which is ASOF_DATE2. I have tried doing this by below mentioned logic.
IFF( (ASOFDATE1 <= (DateTime.Parse("ASOF_DATE2").AddYears(-1))), "-", "ABC")
but this comparison is not done and blank space is shown.
Please suggest.
Thanks
i have two dates in my report. ASOF_DATE1 and ASOF_DATE2. I need to compare the dates in such manner that ASOF_DATE1 is less then or equal to 1 year prior to current month date which is ASOF_DATE2. I have tried doing this by below mentioned logic.
IFF( (ASOFDATE1 <= (DateTime.Parse("ASOF_DATE2").AddYears(-1))), "-", "ABC")
but this comparison is not done and blank space is shown.
Please suggest.
Thanks