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

List Month Names between a Range of Dates

Started by frankrss, 28 Aug 2019 06:04:00 AM

Previous topic - Next topic

frankrss

Hi, Can someone please let me how how to get a list of the month names between a range of dates.  For example, the begin date is 01-feb-2019 and the end date is 12-may-2019. I would like to get a list of the months names: Feb, Mar, Apr and May.

Thanks

Rafiq_123

Try creating a data item, in that use the column name where date cake are stored in extract (). For eg. Extract( month, create_dt).
This will give you the month number. Create ante data item and use case statement to give u the month name based on the number.

DataItem1 -> extract (month, create_dt).
DataItem 2 -> case when DataItem1 = 1 then 'Jan'
Case when DataItem1 = 2 then 'Feb'
And so on.

In the query use the dates as filter to get the result for months between 2 dates.

Hope this helps.

Rafiq

Quote from: frankrss on 28 Aug 2019 06:04:00 AM
Hi, Can someone please let me how how to get a list of the month names between a range of dates.  For example, the begin date is 01-feb-2019 and the end date is 12-may-2019. I would like to get a list of the months names: Feb, Mar, Apr and May.

Thanks