Convert date format sql server

0

Well, I need to convert the date in the sql server to dd / mm / yyyy I need an update or something that can help me. Picture of the table column below, as it stands now:

I need you to stay 03-10-2016 for example.

    
asked by anonymous 18.01.2016 / 18:18

2 answers

1

This is only the default display format within the database, the date information itself is correct and has nothing to change. If you want to return the date formatted as mentioned, you will need to do something like this

SELECT CONVERT(VARCHAR(19),GETDATE(),105)

The last parameter is what determines the formatting, for more details of which numbers are possible: link

    
18.01.2016 / 18:23
0

You can try using:

SELECT CONVERT(VARCHAR(10),GETDATE(),110)

There are other options at: link

    
18.01.2016 / 18:24