摘要:
--获得当月天数 select day(dateadd(mm,1,getdate())-day(getdate())) as 本月天数 ; select getdate() as 当前日期; select day(getdate()) as 目前第几天; select getdate()-day(g 阅读全文
摘要:
DECLARE @WorkDate DATETIMESET @WorkDate='2010-2-20'select DATEDIFF(YY,@WorkDate,GETDATE()),DATEDIFF(MM,@WorkDate,GETDATE()),DATEDIFF(d,@WorkDate,GETDATE()),case when DATEADD(year,DATEDIFF(YY,@WorkDate,GETDATE()),@WorkDate)>GETDATE()-1 THEN DATEDIFF(YY,@WorkDate,GETDATE())-1ELSE DATEDIFF(YY,@WorkD 阅读全文
摘要:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="zh-CN" lang="zh-CN"><head> <title>Model</title> <meta http-equiv="Content-Type" content="text 阅读全文