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!

Present Month

Status
Not open for further replies.

M8KWR

Programmer
Aug 18, 2004
864
GB
I have a date/time field that i want to use to only display the information from the month that the current date is on.

Also I need a seperate report to display the next months information only..

I have a slight feeling i will be asked to do this for the next month as well, but i'm unsure how to do all of this.

Any help/advise will be brilliant, and many thanks in advance.
 
Couple of things you can do here.

Firstly for the current month you can use this in your select expert

{Date Field} in monthtodate

To get next months information you may have to do it slightly different for example

month({Date Field}) = month(currentdate)+1 and
year({Date Field}) = Year(currentdate)....

You can change the +1 to reflect the month from this month you want to show i.e if you want to show October you would use +2, December would be +4 etc..

HTH

-Steve


"if at first you don't succeed, sky diving is not for you"!!! :eek:)
 
To handle changing year for the next month, I use the following.

Code:
{table.field} in dateserial(year(currentdate),month(currentdate)+1,1) to dateserial(year(currentdate),month(currentdate)+2,1-1)
-lw
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top