Home » SQL & PL/SQL » SQL & PL/SQL » problem in converting Seconds to minute (oracle 10g,)
problem in converting Seconds to minute [message #309286] Thu, 27 March 2008 00:44 Go to next message
Messages: 1
Registered: March 2008
Location: Baroda
Junior Member
I am trying to get total minutes and seconds. Iam getting minutes perfactly but not getting seconds properly.
even i am not able to convert those seconds into minutes. please solve my problem.

I am using following query.

select c.mgrp,c.mgrp||'#'||c.name||'#'||c.client_code,
to_char((((uptime-86400000)/86400000) + TO_DATE('1970/01/01','YYYY/MM/DD')),'dd-mon-yy'),
round(sum(min)+(sum(sec)/60)),mod(sum(sec),60) from upt u,client_profile c
where c.client_code=u.client_code and uplevel=5
and uptime>=" + l + " and " + "uptime<=" + l1 + "
and u.client_code in (select client_code " + "
from client_profile where mgrp in (" + s + ")) group by " + "
+ " + " TO_DATE('1970/01/01','YYYY/MM/DD')),'dd-mon-yy'))
having mgrp is not null or c.mgrp||'#'||c.name||'#'||c.client_code is null
order by mgrp,c.mgrp||'#'||c.name||'#'||c.client_code,to_date(to_char((((uptime-86400000)/86400000)
+ TO_DATE('1970/01/01','YYYY/MM/DD')),'dd-mon-yy'),'dd-mon-yy')
Re: problem in converting Seconds to minute [message #309303 is a reply to message #309286] Thu, 27 March 2008 01:43 Go to previous message
Michel Cadot
Messages: 63924
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
This is unreadable.
Please read OraFAQ Forum Guide, especially "How to format your post?" section.
Make sure that lines of code do not exceed 80 characters when you format.
Indent the code (See SQL Formatter) and align the columns in result.
Use the "Preview Message" button to verify.
Always post your Oracle version (4 decimals).

Use a valid SQL statement and not a copy of your code.
This uptime>=" + l + " and " + "uptime<=" + l1 + "... is not SQL.

Previous Topic: Spilit Word in more than one field
Next Topic: Oracle join
Goto Forum:

Current Time: Wed Oct 26 04:36:45 CDT 2016

Total time taken to generate the page: 0.14281 seconds