Capturing the Hour from a Date Time field

I have a field that is currently filled with a date and time - 'action_time'

I want the query to return the hour from this time so I can group by this.  I would also like it to be returned as a 24 Hr hour.

Let me know if any more info is needed.

Scotto13
Scotto13Asked:
Who is Participating?
 
knucklesbammCommented:
select datepart(hh, datecol)
  from dbo.table
0
 
Scotto13Author Commented:
Awesome!

Thanks knuckles
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.