Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Populating a combo with date fields
Message
 
À
16/03/2002 18:23:41
Henry Ravichander
RC Management Systems Inc.
Saskatchewan, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00633827
Message ID:
00633841
Vues:
16
>>Combos always contain character strings no matter what data type you populated them with. The dates are converted to a string indise the combo so your variable is thew worng dtat type for the combo (it is date and it needs to be character). To get your date back you will need to convert the data type after the the combo sets the var.
>
>Thanks Jim. Will DTOC do the job?
>

Ravi,

To get a date value from the combobox you need;

CTOD(Thisform.Combo.Value)

or if you bind the combo to a var (lcDate) you would need to initialize the var to character;

lcDate = ""


and convert it before you use it like;

ldDate = CTOD(lcDate)

All of this will become a nightmare if you have SET STRICTDATE to anything but 0. If it isn't obvious to you yet, combos are not really designed for handling dates.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform