Brandx
|
| Posted: 05/08/2003, 7:05 PM |
|
Could someone help me build a SQL select statement that will pull records from my database that are less than 30 days old?
I'm using ASP/MS Access
TIA
|
|
|
 |
mutsch
|
| Posted: 05/08/2003, 10:15 PM |
|
This should lead to the desired results given a valid date field.
Keep in mind that this is just a code fragment and does not run as is.
SELECT ... FROM ... WHERE ... and (TO_DAYS(NOW()) - TO_DAYS(date_added) <= 30) ...
regards
mutsch
|
|
|
 |
mutsch
|
| Posted: 05/08/2003, 10:18 PM |
|
Oops, I forgot to mention that this is MySQL code and I am not sure how this translates to MS Access. but you should be able to find equivalent date/time functions in MS Access easily.
regards
mutsch
|
|
|
 |
|