Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Validate Time Format
Message
De
17/03/2002 16:15:54
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00625685
Message ID:
00633933
Vues:
18
>>I have a table with a date field (D8) and a time field (C5 - HH:MM). Does Fox have a function to validate just the time field? I don't want to concatenate the fields, I need them to be separate.
>>
>>TIA!
>
>You can check it this way
 IF EMPTY(Ctot("01/01/2002 " + timefiled ))
>  * Time is incorrect
>ELSE
>ENDIF
It also depends on your definition of what is the valid time value in that field.

Sergey,

I was searching for some date validation stuff... and found this thread... does the above mean
lcTest = "35/35/2002"

IF EMPTY( CTOD(lcTest))
  ** This date is bad???
ELSE
 ** This date is good???
ENDIF
So, to validate a string to date, just ask if is empty outside the conversion function??

TIA

Ric
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform