Wrong date format in tables

dates
So i have a table with these dates,

they are in wrong format,

what sql can i use to reformat these dates to

day/month/year

?
Alex LordAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

slightwv (䄆 Netminder) Commented:
What database?
Is it an actual date data type or a string/varchar data type?
Alex LordAuthor Commented:
it is a varchar
SharathData EngineerCommented:
you can try this.

select convert(varchar(10), convert(datetime, date_column), 103) from your_table

Open in new window

OWASP: Avoiding Hacker Tricks

Learn to build secure applications from the mindset of the hacker and avoid being exploited.

slightwv (䄆 Netminder) Commented:
>>it is a varchar
What database product?
Doug BishopDatabase DeveloperCommented:
If you are actually wanting to update the data already in the table with the new format,
UPDATE myTable
SET myDate = CONVERT(CHAR(10), myDate, 103);

Open in new window

However, I would strongly recommend you get away from storing dates in character format and use the built-in SQL Server date/time datatypes (DATE, TIME, DATETIME, etc.) They not only take up less space in the database, they will allow you to perform date/time functions directly on the data without SQL (or you) having to to implicit (explicit) conversions (e.g. DATEADD(), DATEDIFF(), DATEPART()). Furthermore, you won't have issue with different locales.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Alex LordAuthor Commented:
I agree i am fixing someone mistake lol
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
SQL

From novice to tech pro — start learning today.