I have to compare date in the date picker from the current sysdate. I am using below code but every time its runs the else condition. Please help me....I need to run the if condition. Below is the code.
Dim z, a
Set CS = Aliases.CS
Call CS.Main.WindowArea1.DockableWindow5.ExplorerBar.Cl ickItem("Rules") '---Pop-up window where we have date picker
z = Mid(Now,1,9) '----Pick the date from system in M/DD/YYYY format
If z = CS.frmRules.UltraGroupBox1.Dtpdatefrom.wDate Then '---doing comparison between date picker and system date
MsgBox("Date not matched.")
Re: Need help to compare the sys date & date picker
Set a breakpoint on the problematic line and check the two values via the Evaluate dialog. If the string representations of the values are the same, you can use the aqConvert.VarToStr method (see the "aqConvert.VarToStr" help topic ( http://www.automatedqa.com/support/v...aspx?aid=13452 ) for more information) to convert the problematic values to strings and compare the strings.