MSSQLDate/Time FunctionsDATEADD
CURRENT_TIMESTAMP

DATEADDDate/Time Functions

DATEDIFF

Adds an interval to a date.

Syntax

DATEADD(unit, n, date)

Example

Enter values below to update the example in real time.

subscription_id
start_date
expire_date
subscriptions
-- 30일 후 만료일
SELECT subscription_id,
       DATEADD(DAY, 30, start_date) AS expire_date
FROM subscriptions;