• WayneS (5/5/2009)


    As you can see, just converting the field to an int is giving you the desired results.

    [font="Verdana"]Heh. I learn something every day. These two statements are equivalent.

    select

    datediff(day, '19000101', getdate()),

    cast(getdate() as int);

    That makes sense when I think about it. I'm not so sure it would work for the new date datatypes in SQL Server 2008 though.

    [/font]