I'm running Crystal v12.
We use a date field in our SQL database that we use to store the client's year end date.
As the year end date (date and month) doesn't change for a client, the
year end date field in all of our reports is set to just show the DD/MM
part. Over the years as new clients are set up we just enter the date
and month - the year part is irrelevant although as in all date fields
the year is automatically entered.
Doing it this way means that we don't have to adjust the year end year part each year. We just use the DD/MM part.
I need to create a formula that works out the number of days there have
been (i.e. the difference) from the current date to the year end date.
It MUST EXCLUDE the year however.
For example:
Year End Date = 30/04/03
Current Date = 25/05/10
Days Difference (EXCLUDING year) = 25 <--- this is what I need
Days Difference (including year) = 2582
Year End Date = 31/03/09
Current Date = 25/05/09
Days Difference (EXCLUDING year) = 55 <--- this is what I need
Days Difference (including year) = 420
If you include the year part then working out day difference is simply
a case of creating a formula that subtracts the year end date from the
current date (CurrentDate - {tblClient.YearEnd}.
HOWEVER I need to exclude the year part.
Can anyone tell me the formula or best way to do this?
Thanks in advance.