• Try using CAST instead like so:drop table #datediff

    create table #DateDiff (

    Verdate char(10) null

    ,secdate date null)

    insert #DateDiff

    values ('20140101', '20140201')

    SELECT *

    FROM #DateDiff

    where datediff(DAY,cast(verdate as date), secdate) < 212Also notice that I created a table and some sample data to test with please do the same on future questions. Thanks



    Microsoft Certified Master - SQL Server 2008
    Follow me on twitter: @keith_tate

    Forum Etiquette: How to post data/code on a forum to get the best help[/url]