超级高手进FormatDateTime

[复制链接]
查看11 | 回复1 | 2010-5-27 16:50:48 | 显示全部楼层 |阅读模式
Function list_data()

Dim strsql As String

strsql = "select [id], [c_id], [t_id], [u_id], [u_name], [tim],[bumen],[apply_tim], [type], [caigou_name], [caigou_type], [danwei], [num], [yongtu],[beizhu]"

strsql += "from [Purchase_linshi_biao_fu] where [tim]='" & FormatDateTime('yyyymmdd hh', Now) & "'and [bumen]='" & group() & "' and [type]='" & caigou_type() & "' order by [id] desc"

conn.Bind_samp_grid(strsql, dgfind)
End Function
我只要年月日时,但是单引号不可用,请教有才的高手们!谢谢!

回复

使用道具 举报

千问 | 2010-5-27 16:50:48 | 显示全部楼层
FormatDateTime(Date, vbShortDate)这样就好了·· 或者你的(yyyy/mm/dd , now)尝试下....
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行