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 format from Apr 18, 2014 to mmddyyyy

Started by cognos74, 25 Aug 2016 02:13:06 PM

Previous topic - Next topic

cognos74

Hi,

I am getting date in following format in my report "Apr 18, 2014"  so how to get this into 'mmddyyyy'

Thanks,

raj_aries81

Goto  "Data Format" option, change the Format Type to Date and set the pattern to MMddYYYY, make sure its not not DD.

Regards
Raj

jody915

i have a similar issue where i need the date to be in mmddyyyy format, but the data item is not a column on the report so i do not have the ability to change the Data Format.  What expression would is use to remove the '/' from the date?

oscarca

To_date function might work for example:
To_date('2020-11-20','MMddYYYY')

adam_mc

If to_date doesn't work, try the extract function.

Shown below with added cast and substring functions to convert to 8-character result with 2-digit day and month values.

substring(cast(extract(month, [Date]) + 900, char(3)), 2, 2) || substring(cast(extract(day, [Date]) + 900, char(3)), 2, 2) || cast(extract(year, [Date]), char(4))

Hope this helps,
Adam.