rtorres Posted May 15, 2008 Report Share Posted May 15, 2008 Boa Noite, gostaria de saber como listar dados de uma base de dados, mostrando só aqueles que tenham menos 15 dias da data actual. Obrigado. Link to comment Share on other sites More sharing options...
Battousai Posted May 15, 2008 Report Share Posted May 15, 2008 Penso que seja assim ... WHERE ( DAYOFYEAR(NOW()) - DAYOFYEAR(ndata) ) < 15 Link to comment Share on other sites More sharing options...
Tiago Salgado Posted May 19, 2008 Report Share Posted May 19, 2008 Ou WHERE data <= DATEADD("d",-15,getdate()) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now