Click here to Skip to main content
15,799,257 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello to all Guru out there..
I am new to the and sqldatasource.
I have used the sqldatasource in a code and i want to filter the records based on the date, using below function But I always got an error!.
SqlDataSource1.FilterExpression = "[TARGET_DATE] = to_char(target_date,'mm/dd/yyyy') = to_char(to_date('" + txtSrchDate.Text.Trim() + "'),'mm/dd/yyyy')";

can somebody help me?

Updated 31-Jan-11 19:43pm
Sunasara Imdadhusen 1-Feb-11 1:21am    
What is error?
Sandeep Mewara 1-Feb-11 2:04am    
What is the error?

Share this answer
Did you got a chance to look at this knowledge-base article: SqlDataSource.FilterExpression Property[^]
DataColumn.Expression Property[^]

Have a loot at them.
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900