sqlserver funtion CONVERT
styles
-- CAST Syntax:
CAST ( expression AS data_type [ ( length ) ] )
-- CONVERT Syntax:
CONVERT ( data_type [ ( length ) ] , expression [ , style ] )
expression Any valid expression.
data_type The target data type. This includes xml, bigint, and sql_variant. Alias data types cannot be used.
length An optional integer that specifies the length of the target data type. The default value is 30.
style An integer expression that specifies how the CONVERT function will translate expression. For a style value of NULL, NULL is returned. data_type determines the range.
Returns expression, translated to data_type.
For a date or time data type expression, style can have one of the values shown in the following table. Other values are processed as 0. Beginning with SQL Server 2012 (11.x), the only styles supported, when converting from date and time types to datetimeoffset, are 0 or 1. All other conversion styles return error 9809.