日期:2014-05-17  浏览次数:21119 次

时间格式转换 谢谢帮忙
现在数据库里的记录是
2007-5-11   08:50:30  
2007-5-11   14:33:33
我想通过查询   2007-5-11   把数据调出来
我用的是access数据库,我用convert函数,好象不支持~
  "select   USERID,CHECKTIME,NAME   from   CX1   where   NAME   =   ' "&bb& " '   and   ?   =
  # "&StrDate& "#   "

CHECKTIME   是时间字段,   谢谢帮忙



------解决方案--------------------
StrDate=StrDate& " "& "00:00:00 "
enddate=dateadd( "s ",-1,dateadd( "d ",1,strdate))
"select USERID,CHECKTIME,NAME from CX1 where NAME = ' "&bb& " ' and checktime between # "&StrDate& "# and # "&enddate& "# "
------解决方案--------------------
http://www.jw112.com/t_itme.asp?id=4
以上地址是ASP,最常用的日期函数.



------解决方案--------------------
Select USERID,CHECKTIME,NAME from CX1 where NAME = ' "&bb& " ' and CheckTime like '%StrDate% '