The convert() function is used to convert an expression of oneÂ specific data type to another type. Also this function can be used to represent the value of date/time type variable in different different format. As we will discuss later in this post we will see how we accomplish this task.
data-type(length): It specifies the data type in which the value should be converted. It is the targeted data type. expression: Specifies the value that has to be converted. style: It specifies the format of the date/time.
The below table that what we styles are available to use inside the convert() function:
There is another function Cast() that we used to convert data type. To learn more about Cast() Function click Here