rtorres Posted May 15, 2008 at 09:05 PM Report Share #185385 Posted May 15, 2008 at 09:05 PM 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 at 09:52 PM Report Share #185400 Posted May 15, 2008 at 09:52 PM 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 at 12:55 PM Report Share #186051 Posted May 19, 2008 at 12:55 PM 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