I need to convert a datetime field from military time to standard time. I also need to do a datepart to get
just the hour from the time.
I tried using this but I am still getting a military time format.
convert(varchar, datefield, 8)
The results are : 15:30.00, 16:00:00.
I bascially need to get the hour stripped out so my results are like this: 9,10,11,12,1,2,3,4 instead of