中文字幕天天躁日日躁狠狠躁,最近中文字幕大全免费版在线,最近2019免费中文字幕视频三,亚洲精品无码你懂的,亚洲国产精品成人精品小说

  • 相關軟件
    >SET DATEFIRST 創(chuàng)建者:webmaster 更新時間:2006-02-16 15:51

    將一周的第一天設置為從 1 到 7 之間的一個數字。



    語法


    SET DATEFIRST { number | @number_var }



    參數


    number | @number_var



    是一個整數,表示一周的第一天,可以是下列值中的一個。












































    一周的第一天是
    1星期一
    2星期二
    3星期三
    4星期四
    5星期五
    6星期六
    7(默認值,美國英語)星期日



    注釋


    使用 @@DATEFIRST 函數檢查 SET DATEFIRST 的當前設置。



    SET DATEFIRST 的設置是在執(zhí)行或運行時設置,而不是在分析時設置。



    權限


    SET DATEFIRST 權限默認授予所有用戶。



    示例


    下例顯示一個日期值對應的一周中的某一天,并顯示更改 DATEFIRST 設置的效果。



    -- SET DATEFIRST to U.S. English default value of 7.
    SET DATEFIRST 7
    GO
    SELECT CAST('1/1/99' AS datetime), DATEPART(dw, '1/1/99')
    -- January 1, 1999 is a Friday. Because the U.S. English default
    -- specifies Sunday as the first day of the week, DATEPART of 1/1/99
    -- (Friday) yields a value of 6, because Friday is the sixth day of the
    -- week when starting with Sunday as day 1.
    SET DATEFIRST 3
    -- Because Wednesday is now considered the first day of the week,
    -- DATEPART should now show that 1/1/99 (a Friday) is the third day of the -- week. The following DATEPART function should return a value of 3.
    SELECT CAST('1/1/99' AS datetime), DATEPART(dw, '1/1/99')
    GO
    相關文章
    本頁查看次數: