Convert within 24 hours and computer Performance
Dear all,Question 1
I have a date/time field that contains values like this:
CURRENT_DATE
24-11-08 08:11
24-11-08 01:01
25/11/08 03:21
25/11/08 02:21
I want it to appear, just the date and time of 24 hours 00 minutes as:
example of output
24/11/08-08:00
24-11-08 01:00
25/11/08 03:00
25/11/08 02:00
How can I do this?
Question 2
Lets say I have a table with more than 1 million records. These million records they are divided into four categories as shown in the type of error, however, there are several categories listed in characters: like this:
Type of Fault_Type
Hard engine
Soft body work
No_Fault puncture
Hard exhaust
Flexible wing
Nut No_Fault loose on wiper devices
Would it not more efficient to perform:
Select * from tblFault where Type = 'Engine '.
OR
Select * from tblFault where Type = 'Engine' and Fault_Type = 'Hard '.
If I wanted to find all the flaws of the engine, nor are the key primary btw?
If you want only the hour format, you can try with that.
Along with time, if you need: 00 also, you can join by using pipe like a simple solution, if you do not want to compare the dates with all the other dates, rather than just to select the data along with the date field.
-On time with date
SELECT
TO_CHAR (SYSDATE, ' DD/MM/YY HH24') FROM dual
-Time with zero padded
SELECT
TO_CHAR (SYSDATE, ' DD/MM/YY HH24') |': ' |' 00' double
Tags: Database
Similar Questions
-
How to convert minutes to hours and minutes?
Hi Sir,
I want to convert minutes is 90 you want to convert hours and minutes this format should be
01:30 format.
I can't in this format?
Thank youOr like this...
SQL> select to_char(trunc(sysdate)+90/(24*60),'HH24:MI') from dual; TO_CH ----- 01:30
-
Convert seconds to hours and minutes
Hello
I have a column that stores the elapsed time in seconds. I would like to convert to hours and minutes.
FOR EXAMPLE
126 seconds = 2:06. I can't find anything with a search.
Thanks in advance.Hello
Try this code.
Salim cordially.SELECT TO_CHAR (TRUNC (SYSDATE) + NUMTODSINTERVAL (126, 'second'), 'hh24:mi:ss' ) hr FROM DUAL; HR -------- 00:02:06 1 row selected.
-
Convert number in hours and minutes
Hello
I have a SQL statement that is used as a source of my report.
One of the columns is the result of the return of a function calc_working_hours and labeled as working_hours. As seen available_time column (which is a numeric field) is converted to hours: minurtes and called by using avail_time
To_char (FLOOR (available_time / 60)). ':' ||
To_char (MOD (available_time, 60), "FM00") avail_time
I need a similar display during the return of the result of the Working_Hours calc_working_hours(carer.operator_id,'CAHTL19',s.start_time). However, this function returns a varchar type as shown below (displayed as 444:00 and I need to show 07:24)
Select
Carer.operator_id,
calc_working_hours (Carer.operator_id, 'CAHTL19', s.start_time) Working_Hours,
available_time,
To_char (FLOOR (available_time / 60)). ':' ||
To_char (MOD (available_time, 60), "FM00") avail_time
of s rhm_op_available_slots, rhm_operators care, rhm_operators sw, rhm_operators tl
where s.operator_id = carer.operator_id
and carer.bm_id = sw.operator_id
and sw.bm_id = tl.operator_id
and carer.operator_id = '12693'
OPERATOR_ID | WORKING_HOURS | AVAILABLE_TIME | avail_time
12693. 444:00 | 444. 07:24
12693. 444:00 | 444. 07:24
12693. 444:00 | 444. 07:24
12693. 444:00 | 444. 07:24
12693. 444:00 | 444. 07:24
12693. 444:00 | 444. 07:24
I use 11g and any help would be appreciated gratefully.
Kind regards.OK, try this...
select carer.operator_id,TO_CHAR ( FLOOR ((TO_NUMBER(SUBSTR(:calc_working_hours(carer.operator_id,'CAHTL19',s.start_time),1,INSTR(:calc_working_hours(carer.operator_id,'CAHTL19',s.start_time),':' ,1,1)-1))+ TO_NUMBER(SUBSTR(:calc_working_hours(carer.operator_id,'CAHTL19',s.start_time),INSTR(:calc_working_hours(carer.operator_id,'CAHTL19',s.start_time),':' ,1,1)+1,(LENGTH(:calc_working_hours(carer.operator_id,'CAHTL19',s.start_time))+1)- (INSTR(:calc_working_hours(carer.operator_id,'CAHTL19',s.start_time),':' ,1,1)+1))/60))/ 60)) || ':' || TO_CHAR ( MOD ((TO_NUMBER(SUBSTR(:calc_working_hours(carer.operator_id,'CAHTL19',s.start_time),1,INSTR(:calc_working_hours(carer.operator_id,'CAHTL19',s.start_time),':' ,1,1)-1))+ to_number(SUBSTR(:calc_working_hours(carer.operator_id,'CAHTL19',s.start_time),INSTR(:calc_working_hours(carer.operator_id,'CAHTL19',s.start_time),':' ,1,1)+1,(LENGTH(:calc_working_hours(carer.operator_id,'CAHTL19',s.start_time))+1)- (INSTR(:calc_working_hours(carer.operator_id,'CAHTL19',s.start_time),':' ,1,1)+1))/60)), 60), 'FM00') Working_Hours, available_time, TO_CHAR ( FLOOR (available_time / 60)) || ':' || TO_CHAR ( MOD (available_time, 60), 'FM00') avail_time from rhm_op_available_slots s, rhm_operators carer, rhm_operators sw, rhm_operators tl where s.operator_id = carer.operator_id and carer.bm_id = sw.operator_id and sw.bm_id = tl.operator_id AND CARER.OPERATOR_ID = '12693'
I hope this works...
If someone useful or appropriate, please mark accordingly.
-
I bought 4 intellimouse to 4 laptops. After the failure of 3 1/2 month three of appoximately transceivers, quite warm to the touch you can not hold them as if a diode were burned. Two of the transceivers has no less one hour of each other and the other a week later. The first sign was an on-screen error message (windows 7) that a usb driver failed after detecting a device. Did I just get a bad batch of peripheral mouse (Best Buy in Auburn, ME)? Only one of the original devices 4 still works. We have replaced the three different failed with wireless mouse devices and they worked.
Hello JohnMCronin,
These mice come with a warranty. I suggest you contact the Microsoft warranty service to help you with this. You can consult the manual for more information on this warranty. Here is a link you can follow and which will give you information about this:
http://www.Microsoft.com/hardware/warranties.mspx
Thank you
Irfan H, Engineer Support Microsoft Answers -
Problem converting from minutes to hours and minutes
Hello
I have a problem with this sql, the locations of this sql is to convert minutes to hours and minutes, for example, as you can see, I'm trying to convert 125 minutes in hours and minutes, so the result I get is 2.5 but it should be of 2.05
If you have an idea how I could get the result to the format: 2.05 which means two hours and 5 minutes?
It's my sql:
Thanks and greetingsSelect trunc(125/60) || '.' || (125 - TRUNC(125/60)*60) result FROM dual;
CarlosSelect trunc(125/60) || '.' || lpad(mod(125,60),2,'0') result FROM dual; RESU ---- 2.05 SQL>
SY.
-
conversion from minutes to hours and minutes
Hi all
I want to do two things
1. I want to convert minutes to hours and minutes which is
If there are 350 minutes it should be 5.50
2. I have two times column hrs and time allowed minutes now, I want to join this two in
in this way
for example the hrs is 5 and time allowed mins is 40 so I should be join under 5.40
Concerning
Aerts.Hello
The code is a little more readable now, but only a little.
For example, I can see now that you call most GRAND where the 1st argument is a string:
greatest(TO_CHAR ( FLOOR (((timeallowedhrs*60+timeallowedmins)-(timetakenhrs*60+timetakenmins)) / 60)) || ':'
This can cause the error, if the 2nd argument is a NUMBER, but how anyone can find what is the 2nd argument to the LARGEST?
Even though this may not cause the error ORA-01722, there is a good chance that it will give you wrong results. The string "2.00 ' is longer than the string"10 h 45', 2 'being greater than 1'. Perhaps you meant to do more BIG first, then TO_CHAR or maybe you menat another thing altogether.You can simplify the code you a lot if you did some calculations (such as (timeallowedhrs * 60) + timeallowedmin) only once, in a subquery.
For example:INSERT INTO prtempincent (...) WITH got_a_t AS ( SELECT DISTINCT (timeallowedhrs * 60) + timeallowedmin AS a , (timetakenhrs * 60) + timetakenmin AS t , jobcardno , shop ... ) SELECT jobcardno , '3' , ... FLOOR ( (a - t) / 60 ) || ':' || TO_CHAR ( MOD ( (a - t) , 60 ) , 'FM00' ) ...
I find
a - t
easier to read and understand (and debug), that
(timeallowedhrs*60+timeallowedmins)-(timetakenhrs*60+timetakenmins)
How about you?
-
Received a phone call from someone who has not been named (call from a blocked telephone number) saying that Microsoft would block my computer within 24 hours due to virus, we have been forward to microsoft. He said we had a laptop and gave us a serial number. We do not have a laptop. Was it a scam call or this person really used by microsoft? He wanted me to enter an address to give him access to my computer. I refused. Any information you can provide would be appreciated.
Hello
Yes, it's a SCAM!
Avoid scams to phone for tech support
http://www.Microsoft.com/security/online-privacy/avoid-phone-scams.aspxIn the United States, you can contact the local police to the FBI, Attorney general, and
consumer watch groups. Arm yourself with knowledge.The Internet Crime Complaint Center (IC3) is a partnership between the
Federal Bureau of Investigation (FBI) and the National White Collar Crime Center
(NW3C), funded in part by the Bureau of Justice Assistance (BJA).
http://www.ic3.gov/complaint/default.aspxNo, Microsoft wouldn't you not solicited. Nor would they know if any errors
It exists on your computer. So those are the frauds or scams to get your money or
worse to steal your identity.Avoid scams that use the Microsoft name fraudulently: Microsoft has no
for you unsolicited telephone calls help fix your computer
http://www.Microsoft.com/protect/fraud/phishing/msName.aspxScams and hoaxes
http://support.Microsoft.com/contactus/cu_sc_virsec_master?ws=support#tab3Microsoft Support Center consumer
https://consumersecuritysupport.Microsoft.com/default.aspx?altbrand=true&SD=GN&ln=en-us&St=1&wfxredirect=1&gssnb=1Microsoft technical support
http://support.Microsoft.com/contactus/?ws=support#TAB0Microsoft - contact technical support
http://Windows.Microsoft.com/en-us/Windows/help/contact-supportI hope this helps.
Rob Brown - Microsoft MVP<- profile="" -="" windows="" expert="" -="" consumer="" :="" bicycle="">-><- mark="" twain="" said="" it="">->
-
my pc seems to have picked up some malware some body called on this subject there is say my computer crashed completely within 72 hours but I was still 20 minutes in bed at a time can help you
Hello paulfletcherza,
It's a scam; don't worry about this.
Microsoft does not contact you and / or allow someone else to contact you.
-
rreceived 'Apple' email, telling me to check the password within 48 hours. Is it a scam?
Yes, it's almost certainly a scam.
The only time where Apple will send you a letter about your password is if you click on the "Forgot password" link on one of their sites, and even in this case the email will tell you how change or reset, has not check.
-
Original title: hotmail
My hotmail account has been blocked. I tried to send a request to reopen the account. Itsays you will get feedback within 24 hours, there are now more than 48 and I hearnothing...
What should I do?Hello
This problem is specific to Hotmail, I you should post the question in the forums of Windows Live e-mail.
http://windowslivehelp.com/forums.aspx?ProductID=15 -
I want to uninstall the application, because it does not stay charged and want more on my computer and not perform the steps for removing it, but none does not work for me.
Cancel see answer #1 in https://forums.adobe.com/thread/2023066 - includes a link to Chat from Monday to Friday
Sign out of your account... Uninstall... to run vacuuming...
-http://helpx.adobe.com/creative-cloud/help/install-apps.html (and uninstall)
-https://helpx.adobe.com/creative-suite/kb/cs5-cleaner-tool-installation-problems.html
-
1. I am using windows 7 Pro 32-bit on Intel (r) 82945 G chipset.
2. my computer performance details are as
Processor of 4.7 (using mid-range (R) Premium (R) D CPU 3 .00GHz)
5.2 memory (it's 2 GB DDRII)
Chart 2.3
3.1 games graphics
5.7 primary hard drive (I have 1 TB Seagate)
3. Please help me to improve my score
abadola
I don't think that you will be able to increase your score of graphics or increase graphics performance using this chipset... He is old enough.
If your computer allows it, you can install a separate graphics card.
-
convert a number in days, hours and minutes
Hello
I have a table that store minutes unpaid.
I want to get the days, hours and minutes in separate columns
After working hours, a day is considered to be 8 hours
That is to say. 480 minutes is considered to be one day.
create the table unpaidmins as
(
Select 480 as unpaidmins of all the double union
Select 420 as unpaidmins of all the double union
Select 75 as unpaidmins of all the double union
Select 55 as double unpaidmins
)
Required result
--------------------------------------------------------------------
DAY HOURS MINUTES
---------------------------------------------------------------------
1 0 0
0 7 0
0 1 15
0 0 55
-------------------------------------------------------------------
I use oracle 10g
Help, please
Select
trunc(unpaidmins/60/8) as 'DAY '.
, trunc (mod (unpaidmins, 60 * 8) / 60) "the hours."
, mod (mod (unpaidmins, 60 * 8), 60) as "MINUTES".
of unpaidmins
DAY HOURS MINUTES
"1" "0" "0"
"0" "7" "0"
"0" "1" "15".
"0" "0" "55".
-
I get a notification to update when you connect to firefox on my mac. When you try to update, I get a message "connect to Server" which can go over 4 hours and never update. It is most annoying. How can I remove that annoying popup which does not in any case all in ensuring that I have updated to the latest version?
Some Firefox problems can be solved by performing a clean reinstall. This means that you remove Firefox program files, and then reinstall Firefox. Please follow these steps:
Note: You can print these steps or consult them in another browser.
- Download the latest version of Firefox from http://www.mozilla.org office and save the installer to your computer.
- Once the download is complete, close all Firefox Windows (click on quit in the file menu or Firefox).
- Remove the Firefox installation folder, which is located in one of these locations, by default:
- Windows:
- C:\Program Files\Mozilla Firefox
- C:\Program Files (x 86) \Mozilla Firefox
- Mac: Delete Firefox in the Applications folder.
- Linux: If you have installed Firefox with the distribution-based package manager, you must use the same way to uninstall: see Install Firefox on Linux. If you have downloaded and installed the binary package from the Firefox download page, simply remove the folder firefox in your home directory.
- Windows:
- Now, go ahead and reinstall Firefox:
- Double-click on the downloaded Setup file and go through the steps in the installation wizard.
- Once the wizard is completed, click to open Firefox directly after clicking the Finish button.
Please report back to see if this helped you!
Thank you.
Maybe you are looking for
-
I thought that Skype is FREE... .whats upwards with it? Every timee I try to make a call, he wants to pay me for this?
-
Deleted user names and passwords will not apear on a list in the form, but if I start typing them they same apear if I deleted the history. I encountered this problem on several computers: a PC with XP, one with Windows 7 and Mac so I know for some t
-
Why the Desktop Cleanup Wizard brand most used icons used as ever?
No idea why my Desktop Cleanup Wizard marks my most that never used to use icons and offers to delete? I can do anything except turn off reminders of 60 days?
-
My laptop is running windows vista home SP2 and I have MSE and Trend Micro installed. It is really slow and freezes when I do things like burn my pictures on cd. Sometimes, I have to take the battery out to turn it off. I also ran called DriverCure w
-
Hello.. Im trying to create a simple application that opens the browser and just open a link in the browser. When I run the app I get this message: "error starting myproject: Module"myproject"is trying to access a secure API." How to resolve this...