Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Select with date in the where-part in ADO
Message
From
26/09/2001 09:46:16
 
 
To
26/09/2001 08:59:23
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00560904
Message ID:
00560928
Views:
41
>Hi,
>when I try to select with a numeric or character comparison in the where-part, it functions OK.
>But how can I use a time/date comparison in the where-part?
>I use this query and put it in the sourceproperty of an ADO command object:
>SELECT N_ID,C_NAME,C_PLATE,D_STARTDATE, .... FROM database WHERE D_STARTDATE = CTOD('09-09-2001')
>I understand that the CTOD command doesn't exist where (in ADO) the query runs, but I really need to select by date...
>
>TIA ET

It depends on what your backend database accepts as valid syntax for dates. SQL Server for example accepts dates coded as '9/9/2001' so the query that you send to the backend would look like:
SELECT N_ID,C_NAME,C_PLATE,D_STARTDATE, .... FROM database WHERE D_STARTDATE = '09-09-2001'
HTH
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform