CONVERT function in SQL

The CONVERT function in SQL is used to convert an expression from one data type to another. It is most used to convert between date formats, numeric formats, and string formats.

SQL Syntax

CONVERT(data_type, expression, [style])

The function has the following parameters: