日期查询和处理

  1. 查询本周的所有日期
    select convert(varchar(10),dateadd(dd,number,DATEADD(week,DATEDIFF(week,0,getdate()),0)),120) as dt from master..spt_values
    where type='P' and dateadd(dd,number,DATEADD(week,DATEDIFF(week,0,getdate()),0))<=DATEADD(week,DATEDIFF(week,0,getdate()),6)
    
Copyright © TouchNet 2015 all right reserved,powered by Gitbook最后修订时间: 2022-06-21 09:21:02

results matching ""

    No results matching ""