Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Strange coding problem
Message
De
08/06/1999 19:50:36
 
 
À
08/06/1999 11:22:58
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00227459
Message ID:
00227745
Vues:
27
What's the result of ctod(.startdate.value) and ctod(.enddate.value)? Are they valid dates?

The problem may be that "date" is rezerved word in VFP. Change it to something else. If not possible, use the alias in front of it.

Vlad

>I am filtering a table by a date, this is the code:
>
>with thisformset.mainform.infoframe.stageentries
> if .groupdate.option2.value = 1 then
> set filter to project_id = thisformset.mainform.projnum.value and ;
> ccustno = thisformset.mainform.compnum.value and ;
> date >= ctod(.startdate.value) and ;
> date <= ctod(.enddate.value)
> else
> set filter to project_id = thisformset.mainform.projnum.value and;
> ccustno = thisformset.mainform.compnum.value
> endif
>endwith
>
>If the second filter runs, the output is fine, but if the first filter runs, then the output is blank. If I replace the .startdate.value and .enddate.value with actually date strings, ie. '05/05/1999', then the output is fine. I've tried using alltrim and I've tried using the .text field, both don't help. If anyone has any ideas, they would be appericated. It driving me crazy!
>
>thanks
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform