Print Page | Close Window

Creating Formulas

Printed From: Crystal Reports Book
Category: Crystal Reports .NET 2003
Forum Name: Writing Code
Forum Discription: .NET 2003 programming API, report integration
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=46
Printed Date: 05 May 2024 at 6:07am


Topic: Creating Formulas
Posted By: MSBengals
Subject: Creating Formulas
Date Posted: 12 Dec 2006 at 4:54am
Hello,
 
When creating a formula, what can be used to show a difference of 10 days between two date fields from a table in a database? Once That is figured out the formula then displays an message on the report that states the date is past due.



Replies:
Posted By: BrianBischof
Date Posted: 12 Dec 2006 at 8:50am
To find dates that are have expired, you can use the CurrentDate function to get today's date and then subtract the database field from that.

if CurrentDate-{Orders.Order Date}>10 then
     "too old"
else
     ""



Print Page | Close Window