I am using Oracle 8i as back-end. Date and time is stored in a field . the content of the field is 3/10/2005 5:00:03 PM
I am trying to write a query (in VB 6) where I want see if the today's date matches with the date (not the time) stored in that field. this is how I wrote and it doesn't work.
"select count(*) from xxx.tblname WHERE AV_UPDATE_DATE = to_DATE('" & Format(Now(), "DD-MMM-YYYY") & "', 'DD-Mon-YYYY')"
oRS.Open strSQL, cnn, adOpenForwardOnly, adLockPessimistic
The data in the av_update_date field is 3/10/2005 5:00:03 PM.
So when I ran this statement today (03/11/2005), the recordcount should be zero. but it is showing as 1.
What is the mistake I am doing?
Pls suggest.
thanks
nath
I am trying to write a query (in VB 6) where I want see if the today's date matches with the date (not the time) stored in that field. this is how I wrote and it doesn't work.
"select count(*) from xxx.tblname WHERE AV_UPDATE_DATE = to_DATE('" & Format(Now(), "DD-MMM-YYYY") & "', 'DD-Mon-YYYY')"
oRS.Open strSQL, cnn, adOpenForwardOnly, adLockPessimistic
The data in the av_update_date field is 3/10/2005 5:00:03 PM.
So when I ran this statement today (03/11/2005), the recordcount should be zero. but it is showing as 1.
What is the mistake I am doing?
Pls suggest.
thanks
nath