Board index » delphi » SQL and Date-Field in Paradox-Db

SQL and Date-Field in Paradox-Db

I'm trying to do a SQL query on a Date-Field in a Paradox database:

        select * from MyTable
        where MyDate > 01.01.1996

I have tried all known Date-Formats like dd-mm-yy, yy/mm/dd ... but  
without any success.

I can't use dyn. SQL with Params[].AsDate because the SQL-Text will be  
entered by the users into a memo-object...

Is anyone out there who can help ?

Regards
        Detlev

--
PGP public key available on key-servers and via receipt confirmation request

 

Re:SQL and Date-Field in Paradox-Db


Quote
Detlev Jaeger wrote:

> I'm trying to do a SQL query on a Date-Field in a Paradox database:

>         select * from MyTable
>         where MyDate > 01.01.1996

> I have tried all known Date-Formats like dd-mm-yy, yy/mm/dd ... but
> without any success.

> I can't use dyn. SQL with Params[].AsDate because the SQL-Text will be
> entered by the users into a memo-object...

> Is anyone out there who can help ?

> Regards
>         Detlev

When I use date fields is Queries the syntax is as follows:

         select * from MyTable
         where MyDate > '1/1/96'

Hope that helps.

Dean.

Other Threads