Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crystal 8.5: Ending Date Last Year Problem 1

Status
Not open for further replies.

goopit

Technical User
May 9, 2003
43
US
Hello,

With the formula below, I am having trouble getting the correct date to show.

For instance, say the Ending Date for the current year range is 02/01/06. Using this formula, I get an Ending Date for the same range last year as 02/28/05. I would like it to return 02/01/05 instead.

SAME-RANGE-LY-END-DATE

IF Month({?Ending Date}) <> 12
then Date (Year ({?Ending Date})-1, Month ({?Ending Date})+1,-1)-1
Else Date (Year ({?Ending Date})-1, 12,31)


Any help will be greatly appreciated.

Thanks,

Scott
 
You should be able to use just:

dateadd("yyyy",-1,{?enddate})

-LB
 
LB,

Thank you for very much for the prompt and accurate response.

Scott
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top