我要在一个有年月日的日期里查找只要月日符合的日期的记录。 我要在一个有年月日的日期里查找只要月日符合的日期的记录。请问如何才能做到??数据库用access,用ADO连接,使用delphi开发。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 DecodeDate 分解所指定的日期为年、月、日。procedure DecodeDate(Date: TDateTime;var Year, Month, Day:Word); 直接SQL语句里面加%号模糊查找好了select * from tablename where table_date like "%-02-03" 用函数decodedate(date,year,month,day);把日期分解.select * from table where 字段 like '''+'%'+inttostr(month)+'inttostr(day)'+''''); 如果您的日期字段格式是TDATETIME格式的,那么在数据库中可以使用%或者*统配符,SELECT的WHERE子句中使用LIKE关键字。例如:where [日期字段名] like '%[月]-[日]%'具体中间的分隔符号,根据系统设置不同而改变。 DecodeDate 分解所指定的日期为年、月、日。procedure DecodeDate(Date: TDateTime;var Year, Month, Day:Word); datepart('mm','2006-04-20')='04' and datepart('dd','2006-04-20')='20' 郁闷了,这个问题请高手帮忙了!! 高难度问题,怎么让dbgrid导出到Excel自动划格子 ? 求教高手 急!!!!! To 时间问题. 谁有dbgrid导出到excel的快速方法?不用三方控件,不用ole,不用数据集导出的方法。 求interbase6.0 或 6.0以上版本源码,另请评论一下interbase和firebird的不同 sql sever怎么保密 有谁知道哪里有《Delphi5开发人员指南》配套的光盘原码下吗? SPY++抓到的这两条消息是什么消息阿? 帮忙介绍一《表格控件》 能对‘单元格’进行属性设置并很方便的直接进行打印 什么原因呀,晕 多线程问题?
procedure DecodeDate(Date: TDateTime;var Year, Month, Day:Word);
select * from tablename where table_date like "%-02-03"
select * from table where 字段 like '''+'%'+inttostr(month)+'inttostr(day)'+'''');
例如:where [日期字段名] like '%[月]-[日]%'
具体中间的分隔符号,根据系统设置不同而改变。
procedure DecodeDate(Date: TDateTime;var Year, Month, Day:Word);