TSQL DATETIME ISO 8601

前端 未结 7 1125
一整个雨季
一整个雨季 2020-12-04 12:57

I have been given a specification that requires the ISO 8601 date format, does any one know the conversion codes or a way of getting these 2 examples:



        
7条回答
  •  星月不相逢
    2020-12-04 13:25

    this is very old question, but since I came here while searching worth putting my answer.

    SELECT DATEPART(ISO_WEEK,'2020-11-13') AS ISO_8601_WeekNr
    

提交回复
热议问题