CodeCharge Studio
search Register Login  

Visual Web Reporting

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

YesSoftware Forums -> CodeCharge Studio -> ASP

 Showing records that will expire within 30 days?

Print topic Send  topic

Author Message
brandx


Posts: 29
Posted: 06/19/2004, 9:08 PM

Codecharge Studio (latest)
ASP/Access

I have a field "ExpDate" where i enter a date value that represents when it a service will expire... I would like to do one or both of the following..

1. Have a page where it only shows the records that will expire within 30 days...

2. Have an email sent to me if a record will expire within 30 days....

Any Ideas?

TIA,
Geary
View profile  Send private message
LV
Posted: 06/20/2004, 6:52 AM

I am not sure exactly how to implement in CCS but this should work in Access query. So I am assuming that you will need to create an SQL statement for your page.

In Access query you create a new colum and
Expired: IIf([ExpDate]-Date()<30,[ExpDate],IsEmpty([ExpDate])) and set the criteria to >0

If you click on SQL in Access query you will have something like this
SELECT tblJobs.RecordID, IIf([ExpDate]-Date()<30,[ExpDate],IsEmpty([ExpDate])) AS Expired
FROM tblJobs
WHERE (((IIf([ExpDate]-Date()<30,[ExpDate],IsEmpty([ExpDate])))>0));

Good luck, if you get it to work please share the details with us.
brandx


Posts: 29
Posted: 06/22/2004, 8:12 PM

Hi LV

I got it working with the following

SQL = "SELECT TOP {SqlParam_endRecord} * " & _
"FROM HostingDomain"
CountSQL = "SELECT COUNT(*) " & _
"FROM HostingDomain"
Where = "DomainExpire<=Date()+30"
Order = "DomainExpire"

I tried adding the code in bold within the codecharge studio datasource screen but couldn't get it to work.... so I added it manually in code view.

Geary
View profile  Send private message
LV
Posted: 06/23/2004, 6:29 AM

Thanks for sharing, your solution is helpful on my next project that dealing with date calculation. :-)

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.

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.