Using DateDiff to compare dates with a highlight condition
Posted: Mon Mar 05, 2012 5:18 pm
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?
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?