>I replaced TTOD with VFP9's new CAST function in much of my code (not just SQL Selects), but now find it doesn't seem to convert blank datetime fields in VFP tables. For example, in a real estate application table, I have a datetime field named "settlement". TTOD(SETTLEMENT) always yields a date variable regardless of whether the field contains data, but CAST(SETTLEMENT AS DATE) yields a datetime value if "settlement" is blank. This causes problems with comparison tests and measurement of intervals between dates. A known bug, perhaps, or have I erred?
No you didn't erred
dtTest = CAST({} As DATETIME)
? dtTest
? CAST(dtTest as DATE)
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.