date format

Post Reply
angel1234
Posts: 44
Joined: Mon May 17, 2010 8:14 am
OLAP Product: tm1 cognos
Version: 9.5
Excel Version: 2007

date format

Post by angel1234 »

hi,
iam extracting the date from text file in the format 12/2/2010 00:00:00
i need it in the format 12-2-10. in the variables tab i put a new variable for my required format
and done like
new_datevariable=date(olddatevariable,'dd-mm-yy');

IS this a correct format??i am getting olddatevariable is undefined.Please help me as soon as possible

regards
Angel
Gregor Koch
MVP
Posts: 263
Joined: Fri Jun 27, 2008 12:15 am
OLAP Product: Cognos TM1, CX
Version: 9.0 and up
Excel Version: 2007 and up

Re: date format

Post by Gregor Koch »

Hi

To fix you error you need to set the 'Contents' (in the variables tab) of olddatevariable to 'Other'.
But this most likely will lead you to another error as the parameters for the DATE function are a Serial Number and a numeric flag. E.g. from reference guide: DATE(13947, 1)

Try using the SUBST function in combination with LONG.

Cheers
Post Reply