Avatar of Alex Lord
Alex Lord asked on

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

?
SQL* dates

Avatar of undefined
Last Comment
Alex Lord

8/22/2022 - Mon
slightwv (䄆 Netminder)

What database?
Is it an actual date data type or a string/varchar data type?
ASKER
Alex Lord

it is a varchar
Sharath S

you can try this.

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

Open in new window

This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
slightwv (䄆 Netminder)

>>it is a varchar
What database product?
ASKER CERTIFIED SOLUTION
D B

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
ASKER
Alex Lord

I agree i am fixing someone mistake lol