• Not datepart, but try dateadd.

    p.s. the way you've written those queries is highly inefficient. By putting a function on the column, you're forcing a table scan, SQL cannot use indexes properly. Also, you can't go over the year boundries.

    Try something like this rather.

    select <Column List>

    from table1

    where

    DateCol1 between dateadd(mm, -3, getdate()) AND getdate()

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass