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

Converting a Date Calculation to a number/string

Started by bt2133, 28 Aug 2006 01:58:03 PM

Previous topic - Next topic

bt2133

I have 2 dates that I am subtracting from one another to get a date difference (lag days) (e.g., 12/2/06 - 12/1/06 = 1 day).Ã,  The end result gives me the correct number of days, however it is in date 'd' format. I would like to use this data as a number but I can't convert it .Ã,  I need to keep it in Impromptu so that I can build a cube using TransformerÃ,  later.Ã,  How can I convert the end result (e.g., 1 day) to a number?

I appreciate any help you can offer.

Thanks,
Brian

MFGF

The result of subtracting two dates is an interval (days, hours, mins, seconds and thousandths), although Impromptu does not display the time part in your report.  To get hold of the day part of the interval and use it as a number, use the day function: eg day(12/2/06 - 12/1/06) will give you an integer result.

Regards,

MF.
Meep!

bt2133

Looks like that did the trick. Thanks!

Brian