Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Am I tired ?
Message
De
11/02/2008 12:12:04
 
 
À
09/02/2008 08:28:08
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
01291041
Message ID:
01291518
Vues:
12
>e.Day.Date.AddDays(1).ToString("dd-MMM-yyyy") + "'";

I bet that will cause string values like 31-JAN-2008 and 01-FEB-2008 and these strings are bad for date comparison, aren't they? You could change the whole thing to query the vfp way of date constants, that is: {^yyyy-mm-dd}.

So ...ToString("{^yyyy-MM-dd}") should work for you to prepare the dates as date constant in the query, which vfp handles as date values.

Also see

http://msdn2.microsoft.com/en-us/library/8kb3ddd4.aspx for how to use ToString and
http://fox.wikis.com/wc.dll?Wiki~VFPSQL-TSQL-Mapping~VFP for mappings of T-SQL (which may be more familiar) to VFP SQL.

example vfp sql:

select * from sometable where somedatefield between {^2008-01-01} and {^2008-12-31}

Bye, Olaf.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform