Greg ([info]xrmx) wrote,
@ 2008-05-08 15:01:00
Previous Entry  Add to memories!  Tell a Friend  Next Entry
sql fun
Just been playing about with DateAdd function in SQL

SELECT * FROM
dbo.users
where
LAST_LOGIN_DATE > DATEADD(n, -5, CURRENT_TIMESTAMP)
ORDER BY LAST_LOGIN_DATE DESC

DateAdd handy little function ;)



Create an Account
Forgot your login or password?
Login w/ OpenID
English • Español • Deutsch • Русский…