SELECT
GETDATE() AS my_time,
GETUTCDATE() AS utc_time;
weekday : 1(월요일), 7(토요일)
SELECT
OrderDate,
CONVERT(varchar(10), OrderDate,120) AS o_date1,
CONVERT(varchar(10), OrderDate,110) AS o_date2
FROM
SalesOrder;
SELECT
DATEDIFF(day, '2000-01-01', '2000-01-03') AS d_days,
DATEDIFF(hour, '12:00:00', '15:00:00') AS d_hours,
DATEDIFF(week, '2000-01-01', '2000-12-31') AS d_weeks;
SELECT
DATEADD(day, 100, '2000-01-01') AS add_days,
DATEADD(hour, 5, '12:00:00') AS add_hours,
DATEADD(week, 10, '2000-01-01') AS add_weeks;