Solved

# Formula Results

Posted on 2013-01-21
Medium Priority
291 Views
Month({JAM_DSH_OP_Open__Summary.OrderRel.NeedByDate}) < Month(currentdate)

I have a formula above and would like to know what the results would return.  The data being pulled has multiple years before and after the current month.

What I am trying to do is get the formula to select anything less than the current month and back including the prior years.   For example.  If today is 2/24/2013  I am wanting to pull everything from 1/31/2013 back.

Just wanting to make sure this will work.

0
Question by:Trygve Thayer

LVL 77

Accepted Solution

peter57r earned 2000 total points
ID: 38801802
The formula will not do that.
All it does is compare the month number.  So at the moment (Jan 2013 so month=1) It will find nothing because there is no month number less than 1.

To get all data up to the end of the previous month use a selection rule of..

{JAM_DSH_OP_Open__Summary.OrderRel.NeedByDate}) < Dateserial(Year(currentdate),Month(currentdate),0)

The '0'th of any month equates to the last day of the prior month.
0

LVL 101

Expert Comment

ID: 38802116
If you need too include the last day of the month then change the 0 to a 1 or the < to <=

mlmcc
0

LVL 3

Author Comment

ID: 38802538
Ok put that in and understand it  to calculate back the the last day of the prior month and get everything from that day back.  Being new to this I did not realize I could do in one formula.  I have another I woul like checked but will send another post as this satifies the request.
0

## Featured Post

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…