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
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Houe add in getdate()

Author  Topic 

vipinjha
Starting Member

21 Posts

Posted - 2012-03-21 : 07:09:12
Dear All,
I want to add 5 hour on getdate

suppose date is 2012-03-21 16:37:16.700

i want to add 5 hour then it should be like 2012-03-21 21:37:16.700

please suggest valid syntax for same

Regards,
Vipin jha

Vipin jha

RickD
Slow But Sure Yak Herding Master

3608 Posts

Posted - 2012-03-21 : 07:09:53
Look up DATEADD()
Go to Top of Page

vipinjha
Starting Member

21 Posts

Posted - 2012-03-21 : 07:15:24
sorry,

i want to add 5.5 hour in getdate()

Vipin jha
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2012-03-21 : 07:34:31
5.5 hours is 330 minutes, right?



N 56°04'39.26"
E 12°55'05.63"
Go to Top of Page
   

- Advertisement -