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

Previous months totals

Status
Not open for further replies.

Toze2000

MIS
Joined
May 26, 2008
Messages
1
Location
FI
Hi.

I'm working with storage inventory report which supposed to have totals for current month(this is ok), previous month and last month of previous year. For example, if you give parameters ?year?=2008 and ?month?=4, then you supposed that have storage values and totals for all three columns. I tried to create a database view w/ the month calculation but that didn't work out. What would be the best way to parse the parameter values, so the month will be subtracted by one adn year also? -->"?month?-1" and ?year?-1"
 
Take a look at function like
Code:
_add_months(date element,# of months)

You can define both positve and negative offset and tune to your needs.

Ties Blom

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top