Filter DateTime?

Hi every body ..
I have datawindow with column of type "datetime" ,if I made filter on this column there is error message said "Type of expression must match".
Any body tell me How I make filter on datetime column?
Regards
butyAsked:
Who is Participating?
 
sajuksConnect With a Mentor Commented:
Example:

ld_datefiled = Date(em_date.Text)
ls_string = "(somecolumn >= DateTime('" + string(ld_datefiled, "yyyy/mm/dd
hh:mm:ss") + "')) "
0
 
diasroshanCommented:
hi,

if ur applying a filter during design time then try the following,,,

UR filter criteria:

<columnname> = Date('12-12-2004')  // or,

<columnname> = Date(arg_date)  // where arg_date is ur argument...

assuming ur column name is <columnname>..
try passing ur argument as a date...

by using Date() ur type of expression must match error wont pop...

if this doesn't help paste ur code...let me check where u go wrong...

Cheers,
Rosh
0
 
sajuksCommented:
Or

dw_1.SetFilter("datetime(datefield)=datetime('dd/mm/yy')")
0
 
sandhiyaaCommented:
Hi,
paste the filter condition u have given in the appln.
Regards,
Sandhiya
0
All Courses

From novice to tech pro — start learning today.