Hi Ken
If the character vars contain a 4-digit year, there won't be a problem (although STRICTDATE=2 setting doesn't like CTOD() at compile). Otherwise, CTOD() defaults to the current SET CENTURY and/or SET DATE setting. As to a blank date, x={} should do it.
The incorrect results mentioned in the help docs would occur if you were not heads up with the SET commands aforementioned.
>I am converting a FoxPro 2.6a application to Visual FoxPro 6 in order to make it Year 2000 compliant. The .PRG file which activates my .FRX report applies the SET FILTER TO statment on my single table. My .PRG filter criteria specifies that my Finalised Date field which is of date type, must be inequal to null. Null here is represented by the CTOD function with a pair of forward slashes inside.
>
>The problem is, I want to replace all CTOD functions in my application because - with regards to the Year 2000 - the documentation claims they ‘can produce incorrect results’. But how can I replace the CTOD function and keep my criteria the same?
>
>Any suggestions would be much appreciated.
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05