Crystal date formula needed to get Last year to last full month

kelsanit
kelsanit used Ask the Experts™
on
Database field:  invoicedate  
Format: mm/dd/yyyy

Formula 1:
 Need formula to allow me to get last year to last full month.
For example if today is 4/13/2012 it need to put the following:

{oeeh.invoicedt} in Date (2011, 01, 01) to Date (2012, 03, 31)


Note: This formula will be used in a running total select area
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Mike McCrackenSenior Consultant
Most Valuable Expert 2011
Top Expert 2013

Commented:
Try this

{oeeh.invoicedt} in Date (Year(CurrentDate)-1, 01, 01) to Date (Year(CurrentDate)-1, Month(CurrentDate),0)

or


{oeeh.invoicedt} in Date (Year(CurrentDate)-1, 01, 01) to DateSerial (Year(CurrentDate)-1, Month(CurrentDate),0)

mlmcc

Author

Commented:
so today is 4/19/2012 the second forumual you sent will pull

1/1/2011 - 3/31/2011


The last part of the formula appears to be using the current month and not the last full month
{oeeh.invoicedt} >= DateSerial (Year(CurrentDate)-1, 1, 1)  and {oeeh.invoicedt} < DateSerial (Year(CurrentDate), Month(CurrentDate),1)
PMI ACP® Project Management

Prepare for the PMI Agile Certified Practitioner (PMI-ACP)® exam, which formally recognizes your knowledge of agile principles and your skill with agile techniques.

Author

Commented:
the formula is pulling everything through 2012 instead of just 2011

example:
it is pulling 1/1/2011 - 3/30/2012 instead of 1/1/2011-3/30/2011

Author

Commented:
i think I have it working now. Thank you for you help. Do you know of a good cheat sheet I could get for all of these diffrent date formulas and functions?
The example you gave was... ..

{oeeh.invoicedt} in Date (2011, 01, 01) to Date (2012, 03, 31)

The replies just generalised that example to allow for changing years and months.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial