date and time format in sql server code example Example: sql server format datetime to short date CONVERT ( data_type [ ( length ) ] , expression [ , style ] )