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

All dates from last month

Status
Not open for further replies.

jvaneert

MIS
Sep 10, 2002
18
0
0
NL
Hello,

I have a impromptu report which is run at night on the first day of the month. This report should include all dates from the month before.

So eg. the 1-12-2004 report (DMY) should contain 1-11-2004 to 30-11-2004. how can this be calculated in an Impromptu formula? And off course the formula must determine if the last month had 30 or 31 days..

Regards,
Jules
 
Jules,
I use the functions curdate() to get todays date and add-days() day() and first-of-month functions to calculate both the start and end of the prior month.
the days(curdate()) give you a count to deduct from the date to get the last day of last month; putting the expression within first-of-month gives you the start point.

I can't cut and past the filter,
but it's like yourdate between (first-of-month(add-days(curdate(),0-days(curdate())))) and (add-days(curdate(),0-days(curdate()))

soi la, soi carré
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top