Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Add time to a timestamp

Author  Topic 

rowter
Yak Posting Veteran

76 Posts

Posted - 2010-02-02 : 17:48:53
Hi,

I need to add 30 minutes to the current time
I could get te current time this way:
SELECT CONVERT(VARCHAR(30), GETDATE(), 114) as time

How can i do this?

Thanks in advance

Lamprey
Master Smack Fu Yak Hacker

4614 Posts

Posted - 2010-02-02 : 18:19:32
SELECT DATEADD(MINUTE, 30, CURRENT_TIMESTAMP)
SELECT DATEADD(MINUTE, 30, GETDATE())
Go to Top of Page

rowter
Yak Posting Veteran

76 Posts

Posted - 2010-02-03 : 10:05:16
Thanks
Go to Top of Page
   

- Advertisement -