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

Help to Concatenate Dates

Started by jana1120, 28 Feb 2018 04:40:03 PM

Previous topic - Next topic

jana1120

Hi,
I'm new to the forum and new to Report Studio.  My company just moved from DELTEK GCS to DELTEK CP and is using COGNOS.  We don't have training until April, but I need to create reports prior to that.  I've been able to use Query Studio for most, but am having trouble combining columns with dates, so attempting it in Report Studio.  I keep getting an error stating it can't Concatenate date type timestamp2.  The two columns are Start Date and End Date.  They are both formatted as 01/01/18.  So want to combine the columns so I have one column with Start Date - End date appearing like this:  01/01/18 - 12/31/18

Any help would be greatly appreciated.

Thanks,
Jana

sdf

#1
have you tried :

concat([fromdate],[todate])

or

[fromdate] || '-' || [todate]

or

[fromdate] + '-' + [todate]

I doubt you store dates in format 'mm/dd/yy'
so try this.

to_char(cast([startdate],date),'MM/DD/YY') + ' - ' + to_char(cast([enddate],date),'MM/DD/YY')

Lynn

You don't need to concatenate at all to display as you have described. Unlock the layout (there is a padlock icon on the toolbar in version 10) and then drag the end date into the start date column. Drag a text item from the toolbox in between the two data items. Change the column heading as desired.

jana1120

Thank you so much Lynn, that worked perfectly and was so easy!  I'm still a novice at this, but starting to figure it out.  So happy to have found this site. 

Jana

Lynn

Quote from: jana1120 on 01 Mar 2018 09:39:04 AM
Thank you so much Lynn, that worked perfectly and was so easy!  I'm still a novice at this, but starting to figure it out.  So happy to have found this site. 

Jana

Glad to help! There are lots of people here who help out. I've learned so much here and happy to return the favor when I can.

sdf