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

Cannot get MonthToDate formula to work

Status
Not open for further replies.

elsenorjose

Technical User
Oct 29, 2003
684
US
Hi all,

This isn't working the way I thought it would. I get an error saying 'A number range is required here' and 'MonthToDate' is highlighted. My formula thus far is:

Code:
(If month({v_TurnaroundMetricsReportForAPI.MSN_Approval_Date}) in MonthToDate
And month({v_TurnaroundMetricsReportForAPI.LN_Approval_Date}) in MonthToDate
Then 1 Else 0)

I want to use the results of the formula to do a summary on records that have both dates in MonthToDate. I am also getting a similar error when using YearToDate in the formula.

Can someone help me correct this?

I'm using CR XI on SQL Server 2005.

Thank you.
 
If {v_TurnaroundMetricsReportForAPI.MSN_Approval_Date} in MonthToDate And
{v_TurnaroundMetricsReportForAPI.LN_Approval_Date} in MonthToDate Then
1 Else 0

You should be testing whether the dates are in monthtodate, NOT whether the months are.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top