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
 how to get hour value from time datatype

Author  Topic 

mavericky
Posting Yak Master

117 Posts

Posted - 2011-11-15 : 14:13:52
Hi,
how to get hour value from time datatype?
Can anyone help me?

Thanks,
Mavericky

DonAtWork
Master Smack Fu Yak Hacker

2167 Posts

Posted - 2011-11-15 : 14:17:42
datepart(hh,time)

http://weblogs.sqlteam.com/jeffs/archive/2008/05/13/question-needed-not-answer.aspx
How to ask: http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

For ultra basic questions, follow these links.
http://www.sql-tutorial.net/
http://www.firstsql.com/tutor.htm
http://www.w3schools.com/sql/default.asp
Go to Top of Page
   

- Advertisement -