Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Proper syntax for universal date
Message
From
10/04/2003 01:53:53
 
 
To
10/04/2003 01:44:57
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00775886
Message ID:
00775888
Views:
18
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform