Forum Replies Created

Viewing post 1 (of 1 total)

  • RE: DateDiff function

    getdate() = '27/04/2005'

    select DATEDIFF(year,cast('19870129' as datetime) , getdate())

    18 - wrong way

    select DATEDIFF(year,'1900-01-01' ,getdate()-cast('19870129' as datetime))

    17 - right way

Viewing post 1 (of 1 total)