delphi 怎样处理日期货币数据字段,用sql

lizsss 2003-03-21 05:01:28
如题
比如se;ect * from employee where In_date=????
...全文
30 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
lizsss 2003-03-21
  • 打赏
  • 举报
回复
ok
给分
qwertyasd 2003-03-21
  • 打赏
  • 举报
回复
sql server
Query1.SQL.Add('select * from ddd where 违章时间>'''+datetostr(date())+'''')
access
Query1.SQL.Add('select * from ddd where 违章时间>'#+datetostr(date())+'#')
chenquan 2003-03-21
  • 打赏
  • 举报
回复
看你用什么数据库
ms sql就用上面那位大哥的东西
oracle中
select * from employee where In_date=to_date('yyyy-mm-dd','xxx')
sysu 2003-03-21
  • 打赏
  • 举报
回复
Query1.SQL.Clear;
Query1.SQL.Add('select * from employee where In_date = :dt');
Query1.ParamByName('dt').AsDateTime := StrToDate('2003-1-1');
Query1.Open;
NightCloud 2003-03-21
  • 打赏
  • 举报
回复
不是delphi的处理,数据库那边该怎样就是怎样,比如access库
query1.sql.text:='select * from employee where In_date=#''2003-03-21 17:00:00''#'

2,498

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 数据库相关
社区管理员
  • 数据库相关社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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