CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 pulling records <= 30 days old

Print topic Send  topic

Author Message
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

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.