Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)

  • RE: Convert int date(YYMMDD) to datetime

    Thanks for the replies. I settled on the following:

    convert(date,

    case when substring(a.IDNumber,1,2)<=substring(convert(varchar,getdate(),112),3,2) -- when ID birthdate year is less than current year

    then convert(varchar,substring(convert(varchar,getdate(),112),1,2))+substring(a.IDNumber,1,6) -- then add current Centuary

    else convert(varchar,(substring(convert(varchar,getdate(),112),1,2)-1))+substring(a.IDNumber,1,6) -- otherwise...

  • RE: Convert int date(YYMMDD) to datetime

    moymike (2/4/2016)


    I'm assuming a better option has come available since this was posted, but here is another.

    The pivot year is 1950 though, which would be a problem with...

Viewing 2 posts - 1 through 2 (of 2 total)