How to substract Time in SQL Server 2008 R2 -


i want select time range database time range.

eg : if employee has starttime 12:00 range 11:45 12:15 need calculate able add not able subtract.

my code

select datediff(minute, 15, starttime)  employees  employeeid = 18  select dateadd(minute, 15, starttime)  employees  employeeid = 18  select employeeid, starttime, returntime  employees  employeeid = 18 

result

this result

but want is:

instead of -20868 - 11:57:12:0000000

like happens when add 12:12:12 = 12:27:12

is looking for?

select dateadd(minute,-15,starttime) employees employeeid = 18 

Comments

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -