CodeCharge Studio
search Register Login  

Web Reporting

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

YesSoftware Forums -> CodeCharge Studio -> General/Other

 Date Filter Advice

Print topic Send  topic

Author Message
ckroon

Posts: 869
Posted: 08/11/2006, 7:28 PM

Mysql 5.0 /Php 4.0

I have a grid that needs to display records that are coming due within 6 months of the current date.

I have no idea how to get the grid to filter this data properly.

Any advice is greatly appreciated.

Date format is mm/dd/yyy

Thanks!


_________________
Walter Kempees...you are dearly missed.
View profile  Send private message
wkempees


Posts: 1679
Posted: 08/12/2006, 3:34 AM

SELECT DATE_ADD(curdate(),INTERVAL 6 MONTH);
straight from the MySQL Manual
will give you 6 months from today.

SELECT * FROM TABLE
WHERE yourdatefield > DATE_ADD(curdate(),INTERVAL 6 MONTH)

should give you all rows from TABLE in which yourdatefield is GT today + 6 months.

In a Grid
press the grid DataSource
in the VQB (Visual Query Builder) click the Where clause
press the "+" to be ale to add a condition
change type to expression and enter the complete where clause there.

Walter
_________________
Origin: NL, T:GMT+1 (Forumtime +9)
CCS3/4.01.006 PhP, MySQL .Net/InMotion(Vista/XP, XAMPP)

if you liked this info PAYPAL me: http://donate.consultair.eu
View profile  Send private message
ckroon

Posts: 869
Posted: 08/12/2006, 9:30 AM

Walter, you are seriously THE MAN!
Thanks so much!

All hail Walter!
_________________
Walter Kempees...you are dearly missed.
View profile  Send private message

Add new topic Subscribe to topic   


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

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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