Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Access data base datetime query - what datetime format??
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00813055
Message ID:
00813537
Views:
10
>>>I am doing ODBC queries on an Access database. Everything works but I don't know how to format my dates in my VFP code in the SQL query. If I want to get all records where indate > mydate (where indate is an Access datetime field and mydate is a my var in the SQL) how do I format mydate? I tried dtoc() and ttoc() with and without the ,1 parameter but no luck.
>>>
>>>TIA
>>>John.
>>
>>it should be
>>
>>Where indate=#1/1/2002#
>>
>>HTH, Igor
>
>Igor,
>thanks. Ceton's method works for mem vars and it looks like yours will work for literals. The more I know the better off I am. By the way, you don't know of any place that has a bunch if Acess SQL examples, do you?
>
>Thanks again,
>John.

Here are links to three articles with all kinds of Access SQL examples:

Advanced Microsoft Jet SQL for Access 2000: http://msdn.microsoft.com/library/default.asp?URL=/library/techart/acadvsql.htm
Intermediate Microsoft Jet SQL for Access 2000: http://msdn.microsoft.com/library/default.asp?URL=/library/techart/acintsql.htm
Fundamental Microsoft Jet SQL for Access 2000: http://msdn.microsoft.com/library/default.asp?URL=/library/techart/acfundsql.htm

HTH, Igor
Igor Gelin
Database Developer
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform