Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date Time Math in Framework Mgr 8.2

Status
Not open for further replies.

khdavis

Technical User
Mar 27, 2002
22
0
0
US
I have 2 date/time fields that I'd like to subtract and have the output displayed in hours.

Any suggestions would be greatly appreciated?



 
Extract(hour,date1 - date2)
which should yield output as type Int32.

There are other ways by formatting the output to a certain style, but then Cognos seems to keeps it as a datetime type with 'hours' after the value..

Ties Blom

 
You can actually just take the greater date field and subtract from the other lesser date field and times it by 24. (Date1-Date2)*24. Then all you have to do is format the foeld to display as a number. I use this all the time.
 
In C8 Framework manager?
(Date1-Date2)*24 looks like a typical Oracle calculation to me.. (not that that would be invalid, it is though no longer platform independant)

Ties Blom

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top