Should be quite straight forward, I wouldve thought. How I have done it basically use the "advanced condition" rule and in thre just use the out of the box operater such as greater than equal to etc etc. You may have issues I gess, if the two dates are in different formats for example. What I woud suggest is to create a data label and then write both dates into those data latels. Then in the properties for those data labels set it to the same date types format. and then do the comparison between those data labels, just to rule out any issues with mismatch of date formats.
If all fails then you canpass both dates into the workflow and the after the start rule have a code event where you can use c# to manipulate the dates into the same formats. Then compare the dates using the c# library. Then have a datafield called something like "pathdecision" in the process that ou can write to for example. if date a is greater than date b srite "followpathA". and in the line rules coming out of the code event activity, yo can do if "pathdecision" = followpatha do this.
hope this helps
What controls are you loading the dates into to compare?
If your loading the controls into a Date Picker control, it will tack on a Zule time format (which adds date/time even if you don't see it). I would probably output your test controls to a data label to see what exactly is being compared.
If it is the date picker controls, I would probably output them anyway to a data label and do a compare on the lables.
Let me know if you have more info after doing some testing...I can try some compares on this end to play around with it.
David
I created a test view with 2 calendar controls and was able to compare them with an expression tied to a data label.
When I modified the controls to match the datas, the label switched to true...otherwise it showed false. Let me know if this condition doesn't work with loading the data from SQL.
Hi all
There are multiple solutions for this, but the quickest and easiest ones that i can think of would be the following.
Please have a look at this screenshot thoroughly as there are three views each comparing two dates in the same way but the output is different.
I only used a Expression on the Text Box that would display the comparison results as boolean(True/False).
Expression is "MatchessCalDate1, CalDate2]".
"Matches" is a regular expression and the CalDates I used is pulled from the smartobject. Note - When you do not supply the dates on the view itself then you have to tell the view how to get the from the smartobject by using a unique identifier (Example: ID).
Kind Regards
Raymond