I understand the base format of SQL Server is:

YYYYMMDD HHNNSS ....

And that format works via ODBC, and itīs independent of the locale of the Server or 
client.

Maybe some day all this stuff (diferents formats of date) END.

In Argentina we use DD/MM/YYYY, and itīs a hell to validate and enter dates.

----------
Desde:  Tony Sinclair[SMTP:[EMAIL PROTECTED]]
Enviado el:     viernes 29 de octubre de 1999 09:14
Para:   Multiple recipients of list delphi
Asunto:         Re: [DUG]:  Database Explorer Date Literals

Finally got this SQL thing sorted.  On my merry travels trough MSDN deciphering
returned ODBC error codes, I discovered "C to SQL: Timestamp" which describes how
to convert C datatypes into SQL datatypes.  Towards the bottom of the list was a
definition of SQL_C_TIMESTAMP structure which was in this format:

"yyyy-mm-dd hh:mm:ss[.f...]"

Lo and behold, using WHERE Date BETWEEN '1999-05-12' AND '1999-06-15' works!  This
is an ODBC driver supplied by a third-party so it may crop up elsewhere.  As to why
a standard Access query works, I'm guessing, perhaps it tries, tests for error, try
with different format etc.  It maybe more intelligent than that, but hey it's
Microsoft :-) Does Bill read this list....

many thanks

Tony Sinclair
Holliday Group Limited
Christchurch
New Zealand

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

application/ms-tnef

Reply via email to