I need to get only date and hours from datetime field. How do I do that?
My query:
select ImpFile, convert(nvarchar,ImpDate,21) as ImpDate
from nol_artikula_izmaina
The output from this query:

What I need is that it only shows me the date and the hour for example the field ImpDate should look like this: 2012-05-11 14:00:00:000 and 2012-05-11 16:00:00:000
Is that possible?
This works by getting the number of [whole] hours between “date 0” and
ImpDate, then adding that to “date 0”.It’s very similar in principle to removing the time (which gets the number of [whole] days) and can be used to “truncate” to any date part (though for seconds or smaller, you may need to use a different “floor” date than 0 to avoid an overflow).