Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Date Issue Post Reply Post New Topic
Author Message
pungigi
Newbie
Newbie


Joined: 02 Oct 2007
Location: United States
Online Status: Offline
Posts: 7
Quote pungigi Replybullet Topic: Date Issue
    Posted: 20 Mar 2008 at 7:34am
I have a report where I need to set up a formula that runs where the
termdate is null and
effective date >= "Start Date" and termdate< "Start Date"


"Start Date" ALWAYS is the 15th of the previous month, how do I set this up??? Need to find out if a member was eligible on the 15th, not concerned with any other day but if they were eligible on the 15th then they need to be on this report. I will run this around the 8th of every month for prior months data. So on Apr 8th for anyone eligible on the 15th of March and so on.

TIA
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 20 Mar 2008 at 2:14pm

First off  "termdate is null and ... termdate< "Start Date"" is mutually exclusive - you won't ever get any data.

Is the "Start Date" the previous month to the current one?  Or the previous month to the one in effective date?
If it's previous to the current date, here's what you'll do to calculate it:
 
NumberVar theMonth;
NumberVar theYear;
if (month(CurrentDate) > 1) then
  theMonth := month(CurrentDate) - 1;
else
  theMonth := 12;
if (month(CurrentDate) = 1) then
  theYear := year(CurrentDate) - 1;
else
  theYear := year(CurrentDate)
Date(theYear, theMonth, 15)
 
-Dell
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.017 seconds.