Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Why no date??
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00634207
Message ID:
00634210
Vues:
19
Hi Ric,

I just ran you code on my PC and it is working fine. EMPTY(CTOD(lcHolder1)) returns .F.
VFP 6 SP5.

>Hi Everyone.....
>
>Could someone please explain why this is not working:
>
>
>lcHolder1 = "01/01/2002"
>
>*-- Do a cursory check for a proper date format
>lcSetDate = SET("DATE")
>SET DATE TO BRITISH
>*-- just the way we want it....
>IF EMPTY(CTOD(lcHolder1))
>
> *-- This must be an error
>
>ELSE
>
> *-- This should be okay, so compare some dates....
>
>ENDIF
>
>
>
>This above always says lcHolder1 is EMPTY.
>Even putting quotes
IF EMPTY(CTOD("lcHolder1"))....
>
>So how do I validate a date format before I do my date comparisons???
>
>TIA
>
>Ric
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform