Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Why no date??
Message
De
18/03/2002 15:06:41
 
 
À
18/03/2002 14:50:30
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00634207
Message ID:
00634211
Vues:
21
VFP7, SP1 returns 01/02/2002.
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
	wait WINDOW "it is empty" nowait
	
ELSE

 *-- This should be okay, so compare some dates....
 	wait WINDOW "it is not empty" nowait
	? lcHolder1
ENDIF
>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
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform