Page 1 of 1

Using DateDiff to compare dates with a highlight condition

Posted: Mon Mar 05, 2012 5:18 pm
by tottene
Hello,

I am trying to use a highlight condition within Stimulsoft.web.
What I need to do is compare two date values using DateDiff and apply the condition based on the difference. i.e. If greater than 7 days (Pink), 14 (red)...etc

Within conditions I try {DateDiff(PlannedCompletion, ActualCompletion) > 7}
I get a number of errors

I believe the problem lies in that the standard return of the planned date value, with no modifiers (eg ToString("dd-MMM-yyyy")) is formatted as: 1/31/2012 5:00:00 AM. Further more, using the date diff on the two values with no '>' give this return: -7.00:00:00

I have tried this as well: {DateDiff(PlannedCompletion, ActualCompletion) = '-7.00:00:00'}

But receive "Too many characters in character literal.


Any insight on what I am trying to achieve?

Using DateDiff to compare dates with a highlight condition

Posted: Tue Mar 06, 2012 8:44 am
by HighAley
Hello.
tottene wrote:I am trying to use a highlight condition within Stimulsoft.web.
What I need to do is compare two date values using DateDiff and apply the condition based on the difference. i.e. If greater than 7 days (Pink), 14 (red)...etc

Within conditions I try {DateDiff(PlannedCompletion, ActualCompletion) > 7}
I get a number of errors

I believe the problem lies in that the standard return of the planned date value, with no modifiers (eg ToString("dd-MMM-yyyy")) is formatted as: 1/31/2012 5:00:00 AM. Further more, using the date diff on the two values with no '>' give this return: -7.00:00:00

I have tried this as well: {DateDiff(PlannedCompletion, ActualCompletion) = '-7.00:00:00'}

But receive "Too many characters in character literal.


Any insight on what I am trying to achieve?
Please, send us your report template with sample data to reproduce your issue.

Thank you.

Re: Using DateDiff to compare dates with a highlight condition

Posted: Mon Oct 08, 2018 3:33 pm
by tfahnert@web.de
Hi, the issue seems to be the same after 7 years. Where can i send my example report for review?
thanks for info

Re: Using DateDiff to compare dates with a highlight condition

Posted: Tue Oct 09, 2018 2:58 am
by Andrew
Hello,

You may upload it here. But if it contains sensitive information, please send it to support@stimulsoft.com and refer you this forum thread.

Thank you.