• I'm assuming a better option has come available since this was posted, but here is another. It works for dates like 2000-01-01, which in YYMMDD would look like 101.

    convert(datetime,right('00000' + ltrim(str(DATEXYZ)),6),12)

    In current SQL, can switch datetime <-> date also

    The pivot year is 1950 though, which would be a problem with different sorts of dates.

    491230 -> 2049-12-30

    500101 -> 1950-01-01

    If you where doing birthdays you'd want to pivot on a more current year 1915-2014 (1915+35=1950), you could do this:

    dateadd(YEAR, -35,convert(date,right('00000' + ltrim(str(BDAYDATE+ 350000)),6),12))

    If you wanted something that represented dates from 1990 - 2089 then this would work:

    dateadd(YEAR, 40,convert(date,right('00000' + ltrim(str(TRXDATE+ 600000)),6),12))