Hai all,
How to subtract two time values in sql server 2008.I am using time variables in stored procedure.
please help
Hai all,
How to subtract two time values in sql server 2008.I am using time variables in stored procedure.
please help
You can use DATEDIFF()
:
SELECT DATEDIFF(Day, startDate, endDate)
FROM table
SELECT DATEDIFF(Second, date, GETDATE())
FROM table