|
WHERE ORDDAT BETWEEN 01/01/1960 AND 31/12/2000What data typ is ORDDAT? Is it a (real) date or a numeric date?
If it is a real date, you have to embed your Dates into single quotes
(otherwise it calculates 1/1/1960 !:
WHERE ORDDAT BETWEEN '01/01/1960' AND '31/12/2000'
But you need to use a valid date format for the character representation,
i.e.
ISO: YYYY-MM-DD
USA: MM/DD/YYYY
EUR: DD.MM.YYYY
There is no need to convert the character representation of the dates into
the *ISO format (YYYY-MM-DD).
SQL is smart enough to interpret the date representation, i.e. it looks for
the position of the 4 digit year and the separator (/= USA and . = EUR).
Under the cover a date is a numeric value (Scaliger number) and SQL does not
care about any date formats specified in DDS described files.
It just takes the Scaliger number and uses the date format of the current
job/connection for displaying it.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.