|
-
May 11th, 1999, 08:14 PM
#1
ADO Filter -- Date Field
I'm using ADO - Oracle Provider. I need to Filter the a recordset with a
Date field.
I'd tried the ff. but it does not work.
long nService;
long nDayGroup;
COleDateTime oledtDate;
CString strFilter;
...
strFilter.Format("SERVICE=%ld AND DAY_GROUP=%ld AND
DATE_EFFECTIVE=TO_DATE(\'%s\',\'YYYYMMDD')",
nService, nDayGroup, oledtDate.Format("%Y%m%d"));
m_Ado_Service.GetRecordset().SetFilter(COleVariant(strFilter));
...
When I'd tried to remove the Date Field (i.e DATE_EFFECTIVE) -- it works.
What should I'll do to include the Date field in the Filter?
Thanks.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|