bubu
January 28th, 2006, 09:24 PM
My Table in Acess 2000 have a field called: expiration_date that is of type Memo. I save date values there in this format dd/mm/yyyy
In my visual basic program i have a field where i write a date in the same format (dd/mm/yyyy)
I need to get all records where expiration_date <= vb_field_date
Got it? how i do it! 've been trying for the whole day in many formats!!! I even tried concatenating the date parts to form a number and ocmpare it as a number like this:
SELECT * FROM mytable WHERE
CDBL(FORMAT(YEAR(expiration_date),'0000') & FORMAT(MONTH(expiration_date),'00') & FORMAT(DAY(expiration_date),'00'))
<=
CDBL('" & Format(Text_Year, "0000") & Format(Text_Month, "00") & Format(Text_Day), "00") & "')"
this should work since it convert dates into equivalent numbers and compare em but does not work :cry:
Plz help me!!!
Ps. I need the expiration_date field in Memo format.
In my visual basic program i have a field where i write a date in the same format (dd/mm/yyyy)
I need to get all records where expiration_date <= vb_field_date
Got it? how i do it! 've been trying for the whole day in many formats!!! I even tried concatenating the date parts to form a number and ocmpare it as a number like this:
SELECT * FROM mytable WHERE
CDBL(FORMAT(YEAR(expiration_date),'0000') & FORMAT(MONTH(expiration_date),'00') & FORMAT(DAY(expiration_date),'00'))
<=
CDBL('" & Format(Text_Year, "0000") & Format(Text_Month, "00") & Format(Text_Day), "00") & "')"
this should work since it convert dates into equivalent numbers and compare em but does not work :cry:
Plz help me!!!
Ps. I need the expiration_date field in Memo format.