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

Date conversion

Started by satyabadi, 30 Sep 2012 01:40:36 PM

Previous topic - Next topic

satyabadi

Hi All,

I have a quarter field in data base like 200401 ,200402 like this for 1st quarter & 2nd quarter respectvely .
But I want to show it like "first quarter", "second  quarter" instead of 200401,200402 .
(for data ref:you can check go sales package)

How can i do this ?

Thanks in adv!!

Momin

Hi,

U want show "first quarter", "second  quarter" instead of 200401,200402 .If these are the only values u are getting from database.Then u can create one data item by using case function.

case if(quarter field=200401) then  "first quarter" else "second  quarter" end.

if u are getting more than two value from dta base for quarter field then u have to edit the case function as folows.

case if(quarter field=200401) then  "first quarter", if(quarter field=200402) then  "second  quarter"   if(quarter field=200403) then  "third  quarter" end.

Regards,
Momin.

HalfBloodPrince

Try this

if (substring( cast ([date], varchar(10)),5,6)='01') then
('Quarter 1')
else
if(substring(cast([date], varchar(10)),5,6)='02') then
('Quarter 2')
else
if(substring(cast([date], varchar(10)),5,6)='03') then
('Quarter 3')
else

('Quarter 4')