您的位置:首頁技術文章
文章詳情頁

SQL Server 某些條件下求某日的日期

瀏覽:113日期:2023-10-29 14:09:56

/*需要得結果: 某一天的日期已知條件: 這天的年,月,星期幾,在這個月中處于第幾周

舉例說明:; 希望求出2004-11-22已知條件: 2004年,; 11 月,; 星期一 ,這天在11月是第四周

declare @year numeric(4),@month numeric(2),@weekday varchar(6),@week numeric(1)set @year=2004set @month=11set @weekday='星期一'set @week=4*/

alter function RequestDate (@year numeric(4),@month numeric(2),@weekday varchar(6),

標簽: Sql Server 數據庫
国产综合久久一区二区三区