If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

last month

Started by dollipi, 20 Jan 2014 06:53:21 AM

Previous topic - Next topic

dollipi

Hello,

does anyone know a function which always displays the last month?

Best regards,
D.

charon

hi,

try
[month] = (extract(month;current_date)-1)

cheerz

BigChris

Quote[month] = (extract(month;current_date)-1)
Does that work for January?

I'd use something more along the lines of:

[month] = (extract(month;_add_month(current_date,-1)))

charon

Your correct Chris ;)
Just copy/pasted it from a prompt query for year...for months you are absolutly correct. ;D

dollipi

it works, many thanks charon!