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

convert date to string!!

Started by katdbc, 18 Mar 2011 12:54:19 PM

Previous topic - Next topic

katdbc

Can you please help me correct this statement!!

Cast (([Report View].[Eye Charts].[YEAR] -1) ,varchar)

with this i have to conacatenate a text value

Lynn

Assuming the [YEAR] data item contains something like 2011 to represent a year, and is a numeric field (therefore worthy of subtraction), I'd suggest the following:


Cast ( ([Report View].[Eye Charts].[YEAR] -1) , VARCHAR(4) )


To concatenate:


Cast ( ([Report View].[Eye Charts].[YEAR] -1) , VARCHAR(4) ) + ' was a very good year'