我想实现日期的查询 显示日期的控件怎么没反映

nicholas_yy 2003-12-12 06:03:10
我日期控件名叫 uo_2

如何才能实现 uo_2 显示日期的查询呢
string LookforTogether = "(1 = 1)"
if uo_2.text<>"" then
LookforTogether=LookforTogether + " and (c_czd.czrq='" + uo_2.text + "')"
end if

dw_1.setfilter(LookforTogether)
dw_1.filter()

为什么没法实现查询功能呢
我该怎么做呢
...全文
51 11 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
11 条回复
切换为时间正序
请发表友善的回复…
发表回复
wwwafa9 2003-12-14
  • 打赏
  • 举报
回复
uo_2.text是什么内容?
nicholas_yy 2003-12-14
  • 打赏
  • 举报
回复
是一个显示日期的控件 就是一个像下拉菜单 一点就有个选择的日期窗口可以在这里选择日期!!!

可以加我么: 7095682
我把代码给你看看
sinkiangscorpio 2003-12-13
  • 打赏
  • 举报
回复
1messagebox一下LookforTogether的值,或者贴出来
2你的表结构czrq是字符串吗?
nicholas_yy 2003-12-13
  • 打赏
  • 举报
回复
1=1是什么我也不清楚! 我是抄别人的

我czrq是datatime 数据类型!

if uo_2.text<>"" then
LookforTogether=LookforTogether + " and date((c_czd.czrq)=date('" + uo_2.text + "'))"
end if
还是不可以啊~?
ld2099 2003-12-13
  • 打赏
  • 举报
回复
if uo_2.text<>"" then
LookforTogether=LookforTogether +" and "+"date(d_rq)"+how+"date('"+trim(uo_2.text)+"')"
end if
wwwafa9 2003-12-13
  • 打赏
  • 举报
回复
1、我想问一下你那个“1=1”究竟什么意思?
2、检查你的数据类型是否一致?你的czrq是什么数据类型?
你不说清楚,怎么帮你???
sinkiangscorpio 2003-12-13
  • 打赏
  • 举报
回复
用retrieve加参数吧
nicholas_yy 2003-12-13
  • 打赏
  • 举报
回复
我都试过了 还是不行!
cxwsoftware 2003-12-12
  • 打赏
  • 举报
回复
string LookforTogether = "(i = 1)"???????????
if uo_2.text<>"" then
LookforTogether=LookforTogether + " and date((c_czd.czrq)=date('" + uo_2.text + "'))"
end if

dw_1.setfilter(LookforTogether)
dw_1.filter()
qianduo 2003-12-12
  • 打赏
  • 举报
回复
你的是日期型的。格式不对。
wwwafa9 2003-12-12
  • 打赏
  • 举报
回复
你的那个1=1什么意思?
不加单引号试一下。

1,108

社区成员

发帖
与我相关
我的任务
社区描述
PowerBuilder 相关问题讨论
社区管理员
  • 基础类社区
  • WorldMobile
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧