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
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
Post a Comment