Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Proper syntax for universal date
Message
De
10/04/2003 01:53:53
 
 
À
10/04/2003 01:44:57
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00775886
Message ID:
00775888
Vues:
19
>In VFP, on native VFP table, I can do:
>
>
>SELECT News.Numero FROM News;
> WHERE News.AddDate>={^2003/04/01 00:00:00} AND News.AddDate<={^2003/04/30 23:59:59};
> ORDER BY 2 ASC
>
>
>This doesn't work in SQLExec(). How can I have a universal format which would fit both? Or, how can I adjust it in order to have another syntax which would work for SQL Server?

Ok, I have found it. SQL Server takes everything as a string when querying for a date. So, for now, I have something like:
SELECT News.Numero FROM News WHERE News.AddDate>='02/18/2003 13:28:01'
But, this raises the question as to know if when querying from SQLExec() that we should always use MM/DD/YYYY format. Is that universal when querying for date on SQL Server?
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform