Using DateDiff to compare dates with a highlight condition

Stimulsoft Reports.WEB discussion
Post Reply
tottene
Posts: 1
Joined: Mon Mar 05, 2012 4:50 pm
Location: US

Using DateDiff to compare dates with a highlight condition

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

Using DateDiff to compare dates with a highlight condition

Post 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.
tfahnert@web.de
Posts: 2
Joined: Mon May 14, 2018 8:12 am
Location: Berlin

Re: Using DateDiff to compare dates with a highlight condition

Post 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
Andrew
Posts: 4104
Joined: Fri Jun 09, 2006 3:58 am

Re: Using DateDiff to compare dates with a highlight condition

Post 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.
Post Reply