COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Framework Manager => Topic started by: esanray on 27 Nov 2011 09:25:11 AM

Title: Numeric to time
Post by: esanray on 27 Nov 2011 09:25:11 AM
Hi i am working cognos10 i need no convert Numeric to time datatype

MOdel contain float64 datatype.the value is like
1500
1530
2320
1735
i need to convort this in to time format
15:00
15:30
23:20
17:35

because i need to filter from current_time if the current time is 18:00 then it filter last 4 hour data  so the value display between 14:00 and 18:00
and when the  current time is 19:00 the value display between 15:00 and 19:00 and so on.

Title: Re: Numeric to time
Post by: blom0344 on 20 Dec 2011 10:12:26 AM
Would it not be easier to convert the current timestamp to a numeric format like:

extract(hour;current_timestamp)*100+extract(minute;current_timestamp)

So the filter would be:

[numerictime] > extract(hour;current_timestamp)*100+extract(minute;current_timestamp) - 400