Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
CAST with Blank Datetime Fields
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01028674
Message ID:
01028677
Vues:
66
>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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform