Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

date conversion 1

Status
Not open for further replies.

KENDIGIT

Programmer
Mar 26, 2003
17
0
0
US
Hi; I'm trying to get a datetime field converted to a
MMDDYY format.
I'm trying to use the
Code:
Convert(varchar(6), Birthdate,12)
This gives it to me as YYMMDD. I can't seem to find a way to convert it, except to
use the substring command to pull the pieces. Any idea's?

Thanks
Ken
 

select replace(convert(varchar,dates,1),'/','') from a
or
select replace(convert(varchar,dates,10),'-','') from a
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top