How automatically add 1 year date to an existing date in SQL Server

后端 未结 3 1127
抹茶落季
抹茶落季 2021-01-18 12:16

I have a task to automatically bill all registered patients in PatientsInfo table an Annual Bill of N2,500 base on the DateCreated column.

<
3条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-18 12:35

    there should be .add or addyear() function in sql. You add like .add(year, day, month). Read upon sql datetime add year, month and seconds. It is pretty straightforward. It is just like c#.

    Dateadd(info). now time is. getdate().

提交回复
热议问题