Excel Function : CONVERT
Category
Engineering
Description
Converts a number from one measurement system to another
Microsoft Excel Reference Page
https://support.office.com/en-us/article/CONVERT-function-d785bef1-808e-4aac-bdcd-666c810f9af2
Syntax and Description of the CONVERT Excel Function
in sql server
I have a table in sql server with varchar
datatype column.
I wanted to convert the column from mm/dd/yyyy
to yyyy-mm-dd
I have used below syntax.
select convert(datetime,'2/2/2016',110)
It works fine.
My column is not in datetime
datatype.
How can I use convert(datetime,column_name,110)
to convert the column in sql server?
A:
You can
About CONVERT Excel Function
The CONVERT function converts a number from one measurement system to another. For example, CONVERT can translate a table of distances in miles to a table of distances in kilometers.