How to save Hijri dates in sql server tables? What type of column?

后端 未结 4 817
无人及你
无人及你 2021-01-18 18:21

How to save Hijri dates (0000/01/01-9999/01/01) in Microsoft SQL Server tables? What type of column?
I choose datetime2, is it right?

CRE         


        
4条回答
  •  Happy的楠姐
    2021-01-18 18:38

    This help me a lot.

    Declare @Hdate nvarchar(50)
    set @Hdate = convert(varchar(10),convert(date,convert(varchar(12),getdate(),131),103),112)
    

提交回复
热议问题