how to get the time part of datetime in sql code example Example: get time component of datetime sql SELECT convert(varchar(8), getdate(), 108)