Writing Code
 Crystal Reports Forum : Crystal Reports .NET 2003 : Writing Code
Message Icon Topic: Creating Formulas Post Reply Post New Topic
Author Message
MSBengals
Newbie
Newbie
Avatar

Joined: 12 Dec 2006
Location: United States
Online Status: Offline
Posts: 2
Quote MSBengals Replybullet Topic: Creating Formulas
    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.
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet 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
     ""


Edited by BrianBischof - 12 Dec 2006 at 9:10am
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.016 seconds.