Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Universal date format for SQL request
Message
 
To
14/10/2004 06:14:34
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00951317
Message ID:
00951391
Views:
6
This format works - with a single quote around the value.
lt=TRANSFORM(DATETIME())
?lt
select * from tbltable where flddt = '10/14/04 08:50:37 AM'
or
select * from tbltable where flddt = '10/14/04'

I would suggest going into Enterprise Manager and playing around with queries in the Query editor.


>Hello,
>
>From VFP8, I execute some SQL requests through ODBC.
>The data sources can be SQL Server, DBF tables (odbc), MySQL, and so on...
>A problem appears when I want to construct requests with dates.
>According to the SQL system, the syntax for dates are different.
>Ex.: ...where date='10-14-2004' works on SQL server but does not work with DBF tables.
>Is there a 'universal' syntax which can work on all SQL systems ?
>Any tips ?
>
>Thanks for your help.
>Regards,
>Steph
Wayne Myers, MCSD
Senior Consultant
Forte' Incorporated
"The only things you can take to heaven are those which you give away" Author Unknown
Previous
Reply
Map
View

Click here to load this message in the networking platform