question

fashraf avatar image
fashraf asked

Stored procedure that returns time +additional hours.

I want to create a stored procedure that gives me time + the number of hours i am adding or subtracting..For eg:The stored Procedure gives me current time as 12-8-2012 9:00 am and i will pass +2 ...so the stored procedure will give me 12-8-2012 11:00 am.
stored-procedurestime
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
ThomasRushton avatar image
ThomasRushton answered
So what you need to do is [CREATE a PROCEDURE][1] that makes use of the [DATEADD][2] function... I'm not going to answer the question fully, because it looks like homework... [1]: http://msdn.microsoft.com/en-us/library/ms187926.aspx [2]: http://msdn.microsoft.com/en-us/library/ms186819.aspx
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

fashraf avatar image fashraf commented ·
Thanks a ton..Sorry to bother you !
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.