x
login about faq Site discussion (meta-askssc)

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.

more ▼

asked Aug 25 '12 at 01:46 PM in Default

fashraf gravatar image

fashraf
358 1 9 14

(comments are locked)
10|1200 characters needed characters left

1 answer: sort voted first

So what you need to do is CREATE a PROCEDURE that makes use of the DATEADD function...

I'm not going to answer the question fully, because it looks like homework...

more ▼

answered Aug 25 '12 at 08:07 PM

ThomasRushton gravatar image

ThomasRushton ♦
29.5k 6 9 36

Thanks a ton..Sorry to bother you !

Aug 26 '12 at 07:07 AM fashraf
(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments



Facebook logo Follow Ask SSC on Facebook
Find Ask SSC on Google+
linkedin logo Find us on LinkedIn

Topics:

x340
x28

asked: Aug 25 '12 at 01:46 PM

Seen: 312 times

Last Updated: Aug 26 '12 at 07:07 AM

Copyright © 2002-2012 Simple Talk Publishing. All Rights Reserved. If you have any queries, please contact the site administrators.
Ask SQL Server Central is a community service provided by Red Gate.