Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Condition help
Message
De
08/02/2006 15:48:01
 
 
À
08/02/2006 15:40:29
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
01094773
Message ID:
01094779
Vues:
11
if empty(Startdate)
  startdate={01-01-1800}
endif
if empty(enddate)
  enddate={01-01-2500}
endif
>Hi all,
>
>Anybody can help me out how to split the below codes to meet the following
>criteria :
>
>If [startdate] is blank, considers the [enddate] as final filter means from [enddate] backward to any [startdate]
>
>If both ( [Startdate] & [Enddate] ) are blank, take everything
>
>If [Enddate] is blank, considers the [startdate] as beginning filter up until
>to any date no limit for [Enddate].
>
>Thank in advance,
>
>
>
>local lcSql,lcWhere
>
>lcSql = ""
>lcWhere = ""
>
>lcSql = " select * from client  "
>
>Local lcTxtDueDate,lcTxtDelDate
>
>lcTxtDueDate = "DueDate>='[StartDate]' And DueDate<='[EndDate]'"
>lcTxtDueDate= Strtran( lcTxtDueDate, "[StartDate]", Dtoc(date())
>lcTxtDueDate= Strtran( lcTxtDueDate, "[EndDate]", Dtoc(date())
>		>lcTxtDelDate = "DeliveryDate>='[StartDate]' And DeliveryDate<='[EndDate]'"
>lcTxtDelDate= Strtran( lcTxtDelDate, "[StartDate]", Dtoc(date())
>lcTxtDelDate= Strtran( lcTxtDelDate, "[EndDate]", Dtoc(date())
>
>lcWhere = " where " + lcTxtDueDate + " and " + lcTxtDelDate
>
>lcSql = lcSql + lcWhere
>
>
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform