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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I show 2 years to date?

Status
Not open for further replies.

nervous2

IS-IT--Management
Feb 24, 2003
125
CA
I have a report with dates and using the select expert feature I able to select year to date or various other date structures but I want to display 2 years to todays date any idea how to write this formula?

Your help is appreciated.
Thanks
 
How about

(
{table.date} in YearToDate or
{table.date} in LastYearYTD
)

-lw
 
thanks for the reply but it looks like this formula is for Year to Date, I'm looking for 2 years to current date.

Thanks
 
Simplest way is to create two parameters: BeginDate and EndDate

Add the parameters to your Selection Expert, select statement

{file.tran_date} >= {?Pm-?BeginDate} and
{file.tran_date} <={?Pm-?EndDate}

 
Please do not crosspost. I answered in another forum.

-LB
 
I could do that but then i would need to edit the report frequently, to show "2 years worth of data" this report will be run daily and will need to be current.
 
How about:

Date(Year(CurrentDate)-2,1,1) to CurrentDate

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports

"What version of URGENT!!! are you using?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top