SQLdatasource To_char和to_date函数 [英] SQLdatasource To_char and to_date Function
本文介绍了SQLdatasource To_char和to_date函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,大家好..
我是asp.net和sqldatasource的新手.
我已经在代码中使用了sqldatasource,并且我想使用以下函数根据日期过滤记录,但是我总是出错!.
Hello to all Guru out there..
I am new to the asp.net 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'')";
有人可以帮我吗?
Mico
can somebody help me?
Mico
推荐答案
请尝试使用此链接 http://www.c-sharpcorner.com/UploadFile/scottlysle/FilterExpressionsCS10042008064553AM/FilterExpressionsCS.aspx [
Please try this link http://www.c-sharpcorner.com/UploadFile/scottlysle/FilterExpressionsCS10042008064553AM/FilterExpressionsCS.aspx[^]
您是否有机会查看此知识库文章:SqlDataSource.FilterExpression属性 [ DataColumn.Expression属性 [
Did you got a chance to look at this knowledge-base article: SqlDataSource.FilterExpression Property[^]
DataColumn.Expression Property[^]
Have a loot at them.
这篇关于SQLdatasource To_char和to_date函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文