COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Dynamic Cubes => Topic started by: maxchuie on 12 Aug 2015 12:50:40 PM

Title: Date extract conversion
Post by: maxchuie on 12 Aug 2015 12:50:40 PM
Datasource: SQL Server
Forma:t Date   MMM D, YYYY
need to get MMM YYY

tried extract month gives me a number need text MMM
Title: Re: Date extract conversion
Post by: bus_pass_man on 17 Aug 2015 11:16:43 AM
Extract will return an integer representing the month ordinal, which is what the the native sql server function does as well. 

Is there any reason why the sql server datename function isn't suitable for your purposes?
Title: Re: Date extract conversion
Post by: cognostechie on 17 Aug 2015 11:47:23 AM
Quote from: maxchuie on 12 Aug 2015 12:50:40 PM
Datasource: SQL Server
Forma:t Date   MMM D, YYYY
need to get MMM YYY

tried extract month gives me a number need text MMM

There is a simple function which can convert the integer month to a character month and even name it like JAN, FEB but I will give you the solution when
you write the question properly instead of expecting people to understand what you are 'thinking'. Provide examples also about what the data looks like and what you want it to look like.