Home Forums SQL Server 2005 T-SQL (SS2K5) Convert MMDDYY to YYYYMMDD RE: Convert MMDDYY to YYYYMMDD
timbw
Ten Centuries
Points: 1297
More actions
August 17, 2009 at 3:08 pm
#1040523
OR on the same thought
turn the date into a USA format date (style 12) YYMMDD
declare @mmddyy char(6)
set @mmddyy = '081709'
select CONVERT(varchar(35),CAST(RIGHT(@mmddyy,2) + LEFT(@mmddyy,4) AS DATETIME),112)