If this is your first visit, be sure to check out the FAQ by clicking the link above.
You may have to register before you can post: click the register link above to proceed.
To start viewing messages, select the forum that you want to visit from the selection below.
First, is the date stored in the table as a "Date" data type?
If it is, you'll need to specify the date as 'yyyy-mm-dd'
You'll need to include the single quote. For example:
Code:
select f1 from t1 where datefield = '2008-04-10'
__________________
Mirtheil Software
Certified Pervasive Developer
Certified Pervasive Technician
Custom Btrieve/VB development http://www.mirtheil.com
I do not answer questions by email. Please post on the forum.
Thanks for replying.
My datefield in the table is not a "Date" data type.
IT is "Decimal".I'm not allowed to change it.
I want to run something like this:
select * from test where datefield = curdate()-1
datefield is of DECIMAl datatype and the format of the date is 'YYYYMMDD'.
there are 2 option i think. One i have to convert datefield to a "date" datatype
or convert curdate() to a decimal that displays the date as 'YYYYMMDD' instead of yyyy-mm-dd.