以下是引用wuaza在2006-6-23 12:22:00的发言:
统计本月:
Select * From TableName
Where Convert(Varchar(7),日期字段,120)=Convert(Varchar(7),GetDate(),120)
统计本周:select * from tablename where 日期字段 between DATEADD(wk, DATEDIFF(wk,0,getdate()),0) and DATEADD(wk, DATEDIFF(wk,0,getdate()),7)
欢迎光临 Office中国论坛/Access中国论坛 (http://www.office-cn.net/) | Powered by Discuz! X3.3 |