>Dear Experts
>
>There are two variables
>
>cvar1="05-2005" && May 2005
>cvar2="10-2005" && Oct 2005
>
>How to check programatically which variable, I mean which month, is greater?
>
>Please help
>
>Thanks in advance
What do you mean which month?
"01-2006" is greater then "10-2005" as a period but as a month 10 is greater then 1.
If you want to see what period is greater then other, in addition to Graig's answer you can use:
? CHRTRAN(cVar1,"-","") < CHRTRAN(cVar2,"-","")
? cVar1 < cVar2
but if you want to compare just a month portion
? VAL(LEFT(cVar1,2)) < VAL(LEFT(cVar2,2))
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.