Home » Developer & Programmer » Reports & Discoverer » Convert decimal to standard time
Convert decimal to standard time [message #198995] Thu, 19 October 2006 09:37 Go to next message
izza56
Messages: 7
Registered: October 2006
Junior Member
Hi folks,

Pretty new to discoverer and have a tricky one for you to help me resolve. Im using Release - 4.1.x

I have been asked to get a report together to load into another external system. One of the fields is in relation to hours.

Now via discoverer the hour format is in decimal Sad and the external system will only accept standard time (HH:MM)

For example, in the hour field I have 7.75 hours and need this converted to 07:45 (as 75% of an hour is 45mins).

I think i may have to first identify if there is a decimal in the returned row, if so take the two values to the right of the decimal and *.6 and append back to the hour val ?????
Any help would be greatly appreciated, tks
Joe.

Re: Convert decimal to standard time [message #198998 is a reply to message #198995] Thu, 19 October 2006 10:17 Go to previous messageGo to next message
skooman
Messages: 913
Registered: March 2005
Location: Netherlands
Senior Member
SQL> 
SQL> SELECT to_char(trunc(SYSDATE) + (7.75 / 24),'HH24:MI')
  2  FROM   dual;

TO_CHAR(TRUNC(SYSDATE)+(7.75/2
------------------------------
07:45


In discoverer, you can create a calculation that does the same thing.

Regards,
Sabine
icon14.gif  Re: Convert decimal to standard time [message #199106 is a reply to message #198998] Fri, 20 October 2006 03:35 Go to previous message
izza56
Messages: 7
Registered: October 2006
Junior Member
Sabine,

That has sorted it perfectly. Thanks a million

Joe.
Previous Topic: Passing values between workbooks
Next Topic: send output to email
Goto Forum:
  


Current Time: Thu Dec 12 09:15:45 CST 2024