Q:

Microsoft SQL server edit imported file

I'm new in SQL server. I have imported an Excel file into my SQL Server Database. There is a column with the Name of myDate and it shows dates like: 20.07.2018.
I did right click on my table, then I chose "Select 1000 rows" and added the convert code there but it didn't work! I have the same result as before! (the Format didn't change). Is there anyone who knows why it didn't change?
Here is what I wrote:
select convert (varchar,[dateColumn],102) as date2
from [test1].[dbo].[change1]
Go

A:

Having a column's name as myDate doesn't mean its datatype is date, datetime or datetime2. Apparently your data type is VARCHAR. You should use date, datetime or datetime2 for such a column. 
For conversion you can do it like this:
SET DATEFORMAT DMY;

SELECT convert (varchar, TRY_CAST(myDate AS DATE),102) as date2 
from [test1].[dbo].[change1]; 

(Again this is questionable why would you convert to a varchar).

