Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Select query between dates
Message
De
26/06/2003 16:40:18
 
 
À
26/06/2003 16:36:06
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00803952
Message ID:
00804440
Vues:
27
>Hello Fred,
>
>In the below IIF statement when the type is 'D' it is perfectly working.
>
>when the type is not 'D' then the value of the clist1 is becoming empty " / / "
>
>and in the where condition for the between date value it is passing these empty ones " / / "
>
>Only at two project sites it is happening like that.
>
>can you please tell me do i need to put anything in the flower braces of IIF statement please.
>
>**********************************************************************
>ctemp1 = thisform.txtfrm.value
>ctemp2 = thisform.txtto.value
>
>clist1 = DTOC(IIF(type("ctemp1")="D",ctemp1,{}))
>
>clist2 = DTOC(IIF(type("ctemp2")="D",ctemp2,{}))
>
>SET STRICTDATE TO 0
>
>cWhere = " Where BETWEEN(docdate,{" + clist1 + "}, {" + clist2 + "})"
>
>***********************************************************************
>Thank you very much Fred.

BETWEEN doesn't work if the ending value is {}. An actual date value cannot be less than {}.

? BETWEEN(DATE(),{},DATE()+1) && .T.
? BETWEEN(DATE(),DATE()-1,{}) && .F.
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform