Comparison of two dates

Stimulsoft Reports.Silverlight discussion
Locked
Satyakshma
Posts: 5
Joined: Mon Apr 27, 2015 5:51 am

Comparison of two dates

Post by Satyakshma »

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
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Comparison of two dates

Post by HighAley »

Hello.

What type of the dates? It seems that the dates was not parsed correctly.
If you need any additional help, send us a sample report template that reproduce the issue.

Thank you.
jebsen
Posts: 8
Joined: Tue Nov 10, 2015 5:26 pm

Re: Comparison of two dates

Post by jebsen »

I am attempting to list the newest date from three different databands. I have tried to use nested IFF Statements but that produces an error. So I can only compare two dates in an IFF. is there another way to do this?
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Comparison of two dates

Post by HighAley »

Hello.

Do you use native Silverlight or client/server version?
The native Silverlight has limited support of expressions.

Thank you.
Locked