patd1
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.
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.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SELECT CONVERT(VARCHAR(10), getdate(), 101)
returns
08/04/2011