I need help with using a DATEDIFF() function in sql query cn i get an example of hw 2 do it...pls help..thnx in advance

DateDiff help

select * from Table where DateDiff(dd, DateColumn, GetDate()) > 7 --gets records older than 7 days

select  DateDiff(yy, t.Birthdate, GetDate()) as Age from Table t

And there are many other examples in the link above.

Ionut

Thnx 4 replying i will try it......Graffixnerd

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.