TO_CHAR

DATEPART function

T-SQL Datetime functions

Conversion of the date to a string

Typical problems