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

Nextfullmonth

Status
Not open for further replies.

celauritz

Technical User
Dec 2, 2005
41
US
Is there an easy way to do a select expert for the next full month as opposed to next30days. I have a report that has to be run late in the month for the next month, and it cannot be run on the same day every month.
 
I tried this and it seems to work. Any reason why it shouldn't, or a better idea?

if month(currentdate) = 12 then
month({@Date}) = 1 and year({@Date}) = year(currentdate)+1 else
month({@Date}) = month(currentdate)+1 and year({@Date}) = year(currentdate)
 
Try:

{table.date} in
dateserial(year(currentdate),month(currentdate)+1, 1) to
dateserial(year(currentdate),month(currentdate)+2, 1)-1

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top