cancel
Showing results for 
Search instead for 
Did you mean: 

last year data

Former Member
0 Kudos

Good Day to All,

I have a sub-report that i only want to print when the data is within a year of the print date.

So say I'm printing today which is 03/22/2013.

I want all transaction that fall in between  03/22/2012 through 03/22/2013.

I tried using the YearToDate but I was only getting this year information

date({Command.udate}) in YearToDate

Kind Regards,

David M

Accepted Solutions (1)

Accepted Solutions (1)

former_member203168
Active Participant
0 Kudos

Hi David,

Try the below formula

date({Command.udate}) in [Date({Command.udate}) To Dateserial(year(date({Command.udate}))-1,month(date({Command.udate})),day(date({Command.udate})))]

--Praveen G

abhilash_kumar
Active Contributor
0 Kudos

Hi David,

Here's the formula that works. Use it in the Record Selection formula:

{Command.udate} in [cdate(year(currentdate)-1, month(currentdate),day(currentdate)) to currentdate]

Hope this helps!

-Abhilash

Former Member
0 Kudos

Thanks Abhilash works perfectly.

abhilash_kumar
Active Contributor
0 Kudos

Glad it works David!

Please don't forget to close the thread.

-Abhilash

Former Member
0 Kudos

OK

Answers (0)