Avatar of patd1
patd1
Flag for United States of America asked on

sql date format

I have dates stored in my table as 1/1/2010, and I want to read it as 01/01/2010 (MM/DD/YYY)
How can I do that. I tried the following, but still get 1/1/2010.

SELECT CONVERT(VARCHAR(10), [My Column], 101) AS [MM/DD/YYYY] from Temp_crosswalk
result:
7/17/1930
7/17/1930
7/17/1930
1/12/1943

Thanks.
Microsoft SQL Server 2008Microsoft SQL ServerMicrosoft SQL Server 2005

Avatar of undefined
Last Comment
Patrick Matthews

8/22/2022 - Mon
sventhan

I do not see any issues

SELECT CONVERT(VARCHAR(10), getdate(), 101)

returns

08/04/2011
ASKER CERTIFIED SOLUTION
Patrick Matthews

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.
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
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck