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

[Solved]date difference calculation

Started by Desperado, 07 Jun 2006 03:05:27 AM

Previous topic - Next topic

Desperado

Hi All,

I would like to find the date diff between two date fields. and I have to show this difference in the form of days, hours and minutes.

Like , the diff should be shown like 2 days, 12 hours, 25 minutes.. Id there any predefined function in cognos 8 to do this ... I have tried with almost all the functions. But i might be missing some where ... Any help is appreciated. Thanks in Advance

bdybldr

Desperado,
I don't have time to work on this right now but it seems that if you set the Date/Time format for both dates to the same (ie. Short Month, Day = 2 digits, Year = Show Century, Hours = 2 digits, minutes = 2 digits, seconds =  2 digits), then you can cast them as chars as use a substring to parse them out.  Cast them as numbers and perform your calculations on each of them seperately.

I'll work on this when I get the chance.  Good luck.

bdybldr

Desperado,  what's the status of this issue?  Have you found a solution?  Please keep us posted.