MSSQLDate/Time FunctionsDATEDIFF_BIG
DATEDIFF

DATEDIFF_BIGDate/Time Functions

DATENAME

DATEDIFF that can handle large values.

Syntax

DATEDIFF_BIG(unit, d1, d2)

Example

Enter values below to update the example in real time.

start_ts
end_ts
duration_sec
long_running_jobs
-- 대용량 로그 기간 (초 단위)
SELECT DATEDIFF_BIG(SECOND, start_ts, end_ts) AS duration_sec
FROM long_running_jobs;