General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
Hi!
IMO it depends on your data provider. You can use CTOD() for VFP datasources, VB fuctions like CDate() or Now() for Access tables, and expressions like
WHERE D_STARTDATE = 'September 9, 2001'
WHERE D_STARTDATE = '20010909'
for SQL server.
Also you can use ADO command with parameters.
>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...
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only