|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
SQL Statement - Dates newer that 2 weeks.
I am trying to write a statement that will select anything in my table that is 14 days old or newer, here is what I have
SELECT * FROM ARTICLES WHERE (art_type = 1 AND published = 1 AND art_submit_date > DATEADD(DAY, -14, NOW())) I am trying to pull this out of an access DB, hence using NOW() Any help would be appreciated! |
|
#2
|
|||
|
|||
|
Just simplified it down a bit, got it to work
SELECT * FROM ARTICLES WHERE (art_type=1 And published=1 And art_submit_date>(DATE()-14)); |
![]() |
| Viewing: ASP Free Forums > Database > SQL Development > SQL Statement - Dates newer that 2 weeks. |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|