How to change days to hours

Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
regexp_replace(NUMTODSINTERVAL ( ABS ( ( TRUNC (c.so_date)+ TO_DSINTERVAL ('0 ' || c.so_time))- ( TRUNC (a.sr_date)+ TO_DSINTERVAL ('0 ' || a.sr_time)))
, 'DAY'), '([+|-])0+(\d+)', '\1\2 days ') diff
hi above is my query i am getting days in this format
+1 days 21:25:59.000000000
i want only in 45:25:59
Edited by: user9093689 on Feb 17, 2010 5:56 PM

Hi,
Are you still having problems?
If so:
Thanks for posting the CREATE TABLE and INSERT statemements for sr_request1. Isn't there another table involved, that provides the so_date and so_time columns?
If Hoek's solution isn't doing what you want, post that table, and the results you want 9as few columns as possible, just to show the part with which you need help).
If there was an earlier thread that would be helpful to see, then post a link to it.
Whether you use Hoek's approach or mine, it looks like you'll want to compute the number of days first, in a sub-query, so that you can use a simple number (rather than a complicated expression) two or three times to get the right format.
That is, you'll want something like:
WITH     got_n_days     AS
     SELECT ABS ( ( TRUNC (c.so_date)
               + TO_DSINTERVAL ('0 ' || c.so_time)
             - ( TRUNC (a.sr_date)
               + TO_DSINTERVAL ('0 ' || a.sr_time)
             )  AS n_days
     ,     ...     -- the rest of your query goes here
SELECT     ...
,     TO_CHAR (TRUNC (n_days * 24))
     || TO_CHAR ( TRUNC (SYSDATE) + n_days
             , ':MI:SS'
             )     AS hr_min_sec
...

Similar Messages

  • Planning Unit - Changing Days to Hours

    The project I am working in started with Engineering work, scheduled in days. I have added the Construction portion later, which needs to be scheduled in hours. How do I do this within the same schedule without affecting the previous work? I'm working in Primavera P6.1.

    The default planning unit in P6 is hours. So, even though your Engineering work is entered in days, the schedule is calculated based on the equivalent hours.

  • How to change "Day ends at" to after midnight, in iCal OS X Lion?

    Hello Apple/Mac community. Any help on this questions would be greatly appreciated!!!!!
    Donnie C

    Hallelujah - and good riddance Basso!!!!
    After hunting about thru lots of different posts in lots of different places I have found how to do it and have done so myself with great success, thanks to someone called Mike DiVincenzo back in August 2012.
    1. In Finder, go to the "Go" menu: Computer/Macintosh HD /System/Library/Sounds.
    2. Delete the “Basso.aiff” file.
    3. Make a copy of the alert sound you want.
    4. Rename the copy to “Basso.aiff.”
    5. This will make all apps that use Basso for Notification Center play your chosen sound instead.
    You will be asked to add your Mac (NOT your Apple ID) password to make the changes a couple of times.
    And you will have to restart your computer to have the change take effect.
    ***Note also ... "Backson" in Dec. 2013 said:-
    "A safer alternative to deleting Basso is to rename it to something else (like "Basso-BACKUP.aiff"). That way, if you ever decide you want to get the sound back, it's not gone forever. Or you could make a backup copy of it in some other directory."
    I'm s-o-o-o grateful to those two people.  Fantastic advice.
    Cheers - am super happy now!

  • EWA: How to change alert DAYS?

    Hi Experts,
    I want to know how to change days of EarlyWatch alerts. They all are setup for every Monday. How can I change some of them to be scheduled for some other days as well. I'm on SOLMAN SP13. Before SP13, I was able to change the days by going to tcode DSWP, select solution, then solution Landscape > solution Landscape Maintenance > Solution settigs > Here I was able to see days etc...
    Can some one please help me?
    Thanks,

    Red flag means, no data collected or transferred yet.
    Relevant for missing EWA data in SolMan is the RFC destination from Satellite System to SolMan.
    Please check the following in the Satellite System:
    RFC Destination (default name: SM_<SID>CLNT<client>_BACK ) to SAP Solution Manager exists and is functional.
    Transaction SDCCN (Service Data Control Center) must have been activated. Maintenance Package runs daily. RFC Destination (default name: SM_<SID>CLNT<client>_BACK ) is assigned in SDCCN: Goto -> Settings -> Task-Specific -> Session Data Collection -> RFC Destinations -> Settings.
    Check protocol of SDCCN. You should find a task "EarlyWatch Alert for Solution Manager" (or similar)
    Best regards,
    Ruediger
    Edited by: Ruediger Stoecker on Apr 1, 2008 9:04 PM
    Edited by: Ruediger Stoecker on Apr 1, 2008 9:06 PM

  • I created one apple I'd when I started using the iPad.  After some days, I had to create a new apple I'd as there was some problem with the first one. Now at some places still my old apple I'd is appearing.  Pls adv how I change this to my new apple Id.

    I created one apple I'd when I started using the iPad.  After some days, I had to create a new apple id
    as there was some problem with the first one. Now at some places still my old apple Id is appearing.  Pls adv how I change this to my new apple Id.

    Anything you downloaded with the first Apple Id will forever be tied to it, and will always require it to update.
    The question here is, why did you think you needed to create a new Apple ID? What was the problem with the first one?
    To get rid of th old one, you'll need to delete everything you downloaded with it, and then sign out of the ID in several places around the iPad. 
    Go to Settings->iTunes & App Stores->Apple ID->Sign out.
    Repeat the process, for Facetime, Messages, Mail and any other App you need to sign out of.

  • Why doesn't siri know how to change the time of a reminder? When asked, "Do you want to confirm or cancel your reminder?" Reply, "Can I change the time to a half hour later?" Siri doesn't know how to respond.

    Why doesn't siri know how to change the time of a reminder? When asked, "Do you want to confirm or cancel your reminder?" Reply, "Can I change the time to a half hour later?" Siri doesn't know how to respond.

    Hi
    In iMovie'11 (version 9.0.x)
    on top menu row - Apple/iMovie/File/Edit/Cut (Can vary dep. on language - in Swedish Apple/iMovie/Arkiv/Redigera/Klipp . . . )
    down Cut menu - Slow playback/Raspid Playback/Re-play in Slow Motion and onvards
    Here one can select the Pre-Set speeds
    Are you familiar with getting 'inspector' to run?
    No - but I guess that Double Click on clip/sequense or ctrl-Click on it might open it.
    Yours Bengt W

  • How do change Default Day

    I am pretty new to using Crystal Reports and I would like to know how can change the default start date from Sunday to Monday. I have looked around the web to find a solution and I did not find one that worked. I need to be able to change in a Group Header Selection.
    The report is Group by the week using "for each week." I see there is place i can put a formula for the sort order, but I do not know how to write a formula for it.
    Thank you for any help you can offer me.
    Shane
    Edited by: asparatu on Feb 23, 2011 1:46 AM

    It is possible to customized the start of the week by creating a formula that returns the required start day, then group by the formula. The following example start day of week is Monday.
    To customize the start of the week when grouping on a date field, complete the following steps:
    1. Create a formula like:
    WhileReadingRecords;
    Local DateVar vDate := <INSERT YOUR DATE FIELD HERE>; 
    // Start Week Day
    // Values accepted: crSunday, crMonday, crTuesday, crWednesday, crThursday, crFriday, crSaturday
    Local NumberVar weekStartDay := crMonday;
    // Substract N number of days to the date,
    // The date will then be equal to the first day of the defined start day of the week
    vDate - (DayOfWeek(vDate,weekStartDay) - 1)
    2. Create a group on the above formula, and set the 'on change of' value to 'each day'.
    The report is now grouped by a week that starts on Monday
    Note that the formula could be written in one line, but for readbility I have added variables and comments, but if wanted you can use the following formula:
    {Date Field} - (DayOfWeek({Date Field},crMonday) - 1)
    Finally, I am attaching a sample report demonstarting the above technique
    Hope this help,
    Patrick

  • I purchased new iPhone 5 but phone shows cellular usage for lifetime calls 5 days 11 hours. How can this be?

    I purchased a new iPhone 5 and it shows 5 days 11 hours of cellular lifetime call time. I suspect someone had used this phone prior to selling it. Can someone tell me if I am correct. Shouldn't it show only the time that I have logged in calls since purchasing it?

    I synced it with my iTunes account if that is how you restore from a backup. But my old phone shows 7 days and 2 hours call time and my new phone shows 5 days 11 hours.

  • I have a mac 10.5 and need help figuring out how to change my email settings so it does not automatically delete my inbox every 30 days.  How to I adjust the mail settings?

    I have a mac 10.5 and need help figuring out how to change my email settings so it does not automatically delete my inbox every 30 days.  How to I adjust the mail settings?

    I think it must be an IMAP account then, & in Mail>Preferences>Accounts>Advanced>Keep copies for Offline viewing:>Don't keep copies, then on the Server, or maybe it's just this one itself, but on the Server you have a setting to remove eMails after 30 days.
    If it's a POP account we'd have to investigate that... but you didn't say so I'm guessing here.

  • 4G 30 day pay as you go wifi-how to change contents lock?

    Hi sorry I used incorrect terminology on last post - it is the Contents lock that I need to change as we dont' need a family setting. I cannot find the link despite following EE advice to log in, go to Device and then Device useage; 8 options are there but not how to change the contents lock.Please advise thanks.gild

    Hi sorry I used incorrect terminology on last post - it is the Contents lock that I need to change as we dont' need a family setting. I cannot find the link despite following EE advice to log in, go to Device and then Device useage; 8 options are there but not how to change the contents lock.Please advise thanks.gild

  • How to change background color in online editor

    How to change background color in online editor

    Jeff,
    if you try to change all the plsql keywords to the same background color (that is not either white or black or blue) via the options panel in SQL Developer (Code Editor > PLSQL syntax colors), you will get the new background color in the worksheet only for the areas with plsql text, while the areas without any text will have the same background color as the base color scheme you started with. This means that there is no way to change the "general background" color via the options panel, but you have to use the same background color of one of the predefined color schemes.
    This seems to me a bug, but probably it's not considered high priority, so it will not be fixed for the time being.
    I would like to stress the fact that being able to change the color scheme of the development environment that you use every day about 8 hours a day can make quite a difference on your eyes at the end of the day.
    Thanks,
    Paolo

  • How to change the emmbedded ip address in sip using nat

    i have traffic on a private ip range sending sip traffic that is being natted to another range on a cisco router. how do i get the nat router to change the ip address embedded in the sip to the nat address.

    Hi Daniele,
    Thanks. But this is already enabled.
    This is my present config and show ver.
    sh ver
    Cisco IOS Software, C1900 Software (C1900-UNIVERSALK9_NPE-M), Version 15.0(1)M2, RELEASE SOFTWARE (fc2)
    Technical Support: http://www.cisco.com/techsupport
    Copyright (c) 1986-2010 by Cisco Systems, Inc.
    Compiled Wed 10-Mar-10 22:27 by prod_rel_team
    ROM: System Bootstrap, Version 15.0(1r)M6, RELEASE SOFTWARE (fc1)
    NORF50IPT1 uptime is 1 day, 23 hours, 26 minutes
    System returned to ROM by reload at 11:21:52 MSD Sat Aug 20 2011
    System image file is "flash0:c1900-universalk9_npe-mz.SPA.150-1.M2.bin"
    Last reload type: Normal Reload
    Last reload reason: Reload Command
    interface GigabitEthernet0/0
    description link to Avaya PBX
    ip address 146.30.106.250 255.255.255.252
    ip nat inside
    ip virtual-reassembly
    duplex auto
    speed auto
    interface GigabitEthernet0/1
    ip address 192.168.211.106 255.255.255.0
    ip accounting output-packets
    ip nat outside
    ip virtual-reassembly
    duplex auto
    speed auto
    ip nat service allow-multipart
    ip nat inside source static 192.168.1.10 192.168.211.106 route-map ipt
    access-list 1 permit 192.168.1.0 0.0.0.255
    route-map ipt permit 10
    match ip address 1
    here is the output from a debug ip nat sip:-
    *Aug 22 10:57:26 MSD: NAT: map match ipt
    *Aug 22 10:57:26 MSD: mapping pointer available mapping:0
    *Aug 22 10:57:26 MSD: NAT: New entry added to map hash table
    *Aug 22 10:57:26 MSD: NAT: i: tcp (192.168.1.10, 52435) -> (192.168.111.2, 5060)
    *Aug 22 10:57:26 MSD: NAT: created edit_context (192.168.1.10,52435) -> (192.168.111.2,5060)
    *Aug 22 10:57:26 MSD: NAT: s=192.168.1.10->192.168.211.106, d=192.168.111.2
    *Aug 22 10:57:26 MSD: NAT: o: tcp (192.168.111.2, 5060) -> (192.168.211.106, 52435)
    *Aug 22 10:57:26 MSD: NAT: s=192.168.111.2, d=192.168.211.106->192.168.1.10
    NORF50IPT1#
    *Aug 22 10:57:52 MSD: NAT: map match ipt
    *Aug 22 10:57:52 MSD: mapping pointer available mapping:0
    *Aug 22 10:57:52 MSD: NAT:refcount increased to entry in map hash table
    *Aug 22 10:57:52 MSD: NAT: i: tcp (192.168.1.10, 45661) -> (192.168.111.2, 5060)
    *Aug 22 10:57:52 MSD: NAT: created edit_context (192.168.1.10,45661) -> (192.168.111.2,5060)
    *Aug 22 10:57:52 MSD: NAT: s=192.168.1.10->192.168.211.106, d=192.168.111.2
    *Aug 22 10:57:52 MSD: NAT: o: tcp (192.168.111.2, 5060) -> (192.168.211.106, 45661)
    *Aug 22 10:57:52 MSD: NAT: s=192.168.111.2, d=192.168.211.106->192.168.1.10
    I cannot see it changing the embedded ip in the sip.

  • How to change the Settings in the Graphic structure. T Code CN41

    Hi,
    How to change the Settings in the Graphic structure. T Code CN41
    Iam using the T Code cn41 to know the diff in Duruation, work, remaining duration in diff project version. I am getting the Graph/curve with standard settings and system is not allowing to change the scale (Y-X Axis) the way i required.
    Pls advise me.
    Thanks in Advance.
    Raju

    Hi,
    Thanks for the reply. But please clarify a bit. Please below is my requirement.
    As per the SAP Avilable screen in T Code CN41,it is showing the scale of 1 and 2 only.
    Assume if it 12 Days as actual work VS Actual duration of 265 Hours .It is showing 2 = actual work of 12 days and 1= Actual duruation of 12 Days.  I want to have the scale in such a way that, we should be able to see from 0-100-200-300 Hours and Days 5-10-15-20.
    Can u pls advis how can i get these and also give me ur mail id so that i can send u the screen shot also.
    Regards
    Raju

  • How to change the format in shipping point

    Hiii.. When we define shipping point, how to change the format from hours to days for entering loading time & pick pack time.
    Regards,
    Jay

    When you maintain working times in define shipping point, the time is maintained in HRS. This is called precise scheduling.
    If u do not mainatin the workin times field (blank) then the time is maintained in days. This is daily scheduling.
    Vishal

  • How to change default alerts in iCal?

    Hello.
    Every time you add a new event in iCal, the Info panel of the event contains a series of default alerts that you may want to add to it. However, all of them are useless to me (e.g.: "Send email to <my address> 4 days after), so I need to manually edit them event by event. Anybody knows how to change them? I have already inspected all the plist files related to ical, and looked inside the ical package content, but I found no indication of where to change these values. Using iCal version 5.0.2
    Thanks,
    l

    John: Thank you, this is exactly what I wanted. I was indeed inspecting the plist with bbedit, but what I did not realize is that the file has some parts which are binary, so I could not see the PersistentMenu-lastUsedAlarms part by using a text editor. I opened it with Xcode and I did find what you were saying, and erased all the junk that was in there. In fact, the issue I had was also described here:
    http://newsgroups.derkeiler.com/Archive/Uk/uk.comp.sys.mac/2010-06/msg02349.html
    For some reason, it looks like after some upgrade the program adds were some positive values in the plist and I was stuck with default alarms that were set *after* the events I wanted to set an alarm for.
    I did what you suggested, then added by hand new values to the PersistentMenu part of the plist, and I am now happy.
    For everybody's information, to know what I did, it is enough to know to add Dictionary items to the  PersistentMenu-lastUsedAlarms, with 3 fields:
    -- AlarmTypeKey (this determines if you want a sound, or else an email, or else the other default alarm type keys. For example, sending an email is a Number, value 4; having a message with sound is a Number, value 3)
    -- AlarmDurationKey: This is a Number, in seconds, that determines when you want your alarm to trigger. E.g: -172800 will be two days before. Must be negative for "before", of course)
    -- AlarmParameterKey: This is a String, where you store the value that you want the alarm to have. For example, if you want an email to be sent, the AlarmTypeKey will be 4, as explained above, and this field will contain your email address. Instead, if you want the alarm to be a sound, the AlarmTypeKey will be 3 and this field will have the name of the sound you want (e.g., Basso).
    That's it. Thanks a lot for the solution!
    l.

Maybe you are looking for

  • Not able to get the value of ODI Variable when i pass thru Option

    Hi, I have ODI variable called prev_etl_run_date which will hold the last successful etl run date. I want to use the value of this variable in one of my KM step. But i don't want to use directly in my KM. So I passed the variable name thru KM Option.

  • How can i change my verification email address

    i used a foney email address but i didn't know it would have me verify it so how can i change the verification email address to send to a active email address. And i tried making a yahoo account for the foney email i used but yahoo says that email is

  • How to find out the RasterItem(embedded) links name?

    How to find out the RasterItem(embedded) links name which appeared in Links menu(Window->Links) via scripting for illustrator cs3. Please advise me the possibilities. Thanks for looking into this.

  • Question about creating a report with variable columns

    Post Author: Archmage CA Forum: General Hi, Is there a way to create a  Crystal report based on the following situation? Run a stored procedure with two date parameters: If you run from 9/1/07 to 9/30/07, then the data result would be as follows: (ex

  • Time Machine LOG file, does one exist

    I'm getting errors saying that the time machine backup has failed, but there seems to be no detail as to how it failed. Yet, when I look at the Time Machine status, it will show that backups are completing. I just no longer can find out if they are r