Getting a Number from Time - Time

I Want to subtract two time stamps so that it will return a number. How do I set this up in sql? (i.e. 11:45 AM - 11:30 AM = 15)
Message was edited by:
user510014

Maybe this example helps:
SQL> with t as
  2  ( select   to_timestamp('01-01-2007 11:45 AM','dd-mm-yyyy hh:mi am')
  3           - to_timestamp('01-01-2007 11:30 AM','dd-mm-yyyy hh:mi am') diff
  4    from dual
  5  )
  6  select extract(hour from diff)
  7       , extract(minute from diff)
  8    from t
  9  /
                 EXTRACT(HOURFROMDIFF)                EXTRACT(MINUTEFROMDIFF)
                                     0                                     15
1 rij is geselecteerd.Regards,
Rob.

Similar Messages

  • FM to get Personel Number from USER ID

    Hi,
       Is there any FM to get Personel Number from the USER ID(sy-uname).
    Thank you,
    Ramu N.

    Hi Ramu,
    You can find the user-id & Personnel Number in the table PA0105.
    select single PERNR from pa0105 into PERSONEELSNUMMER
    where usrid eq USER_ID
    and   endda eq '99991231'.
    hope this helps!
    best regards,
    Thangesh

  • I deleted my iPhoto Application from my MacBook Air by mistake. But I have backup on my TimeMachine. How does it work if I wanna get it back from Time Machine? Is it possible? Thanks.

    I've just deleted iPhoto from my applications by mistake on my MacBook Air. But I do have a backup on Time Machine. Can I get it back from there? How do I do it? Thanks.

    Do you still have iPhoto in your Trash? Thenopen the Trash, select "iPhoto", ctrl-click, and select "Put Back".
    If iPhoto came preinstalled on your mac, or you bought it from the AppStore, it would be easier, to download it again from the AppStore. If you open the AppStore and sign in with your AppleID, click the "Purchased" tab, then you should see iPhoto waiting for you, ready to download. Click the "Install" button.
    To restore from TimeMachine, select your Applications folder in the Finder.
    Enter Time Machine and go back  in time, to the time before you deleted your iPhoto. select iPhoto and press the restore button.
    Good Luck

  • I have an inetrnet modem and the time capsul one, I need to shutdown the internet modem signal so I only get the one from Time capsul. Does anyone knows how to do that?

    How do I turn off a modem signal so I only get the one from the time capsul?

    What is the make & model of your modem?

  • Retrieve mac serial number from Time Machine backup

    I recently had my 2007 Macbook stolen and I have no record of my serial number to report to police/insurance.  I've tried looking it up from my apple ID but it's so old that the mac outdates any apple ID I've ever had.  Is there any way to retrieve the serial number from a Time Machine backup?

    Hi Roxpat,
    It is possible to export and import selected mailboxes with the Mac OS X Mail application, and that would allow you to select only the mail that you want. Am I right that is what you want to do?
    This article explains how you can do what you want -
    Mail (Yosemite): Import or export mailboxes
    Export the mailboxes from your older Mail application on the previous computer, then move the exported mailboxes, then import them into the new Mac's Mail application.
    Thanks for using Apple Support Communities.
    Best,
    Brett L 

  • Get records number from internal table with condition.

    Internal table itab got more than 1000 records,now i need to get the number of records with condition that itab-field1 = 'XXXX'.
    actully, i got an inefficient logic to count the number in a loop statement. is there better way to implement it?

    hello,
    Every time assigning data into temp table and delete may that may not be much efficient. You can check in loop logic how much time is taken. You can check the below code. here I am trying to check the numbers of plant for for one material.
    In this logic material is the first field. So if there is option to make the required field in to the 1 st position then it will be nice.
    TYPES: BEGIN OF x_count,
            matnr TYPE matnr,
            count TYPE i,
           BEGIN OF x_count.
    DATA: i_marc  TYPE STANDARD TABLE OF marc,
          i_count TYPE STANDARD TABLE OF x_count,
          wa_count TYPE x_count.
    FIELD-SYMBOLS: <wa_marc> TYPE marc.
    SELECT * UP TO 1000 ROWS
      FROM marc
      INTO TABLE i_marc.
    IF sy-subrc = 0.
      SORT i_marc BY matnr.
      LOOP AT i_marc ASSIGNING <wa_marc>.
        wa_count-count = wa_count-count + 1.
        AT END OF matnr.
          wa_count-matnr = <wa_marc>-matnr.
          APPEND wa_count TO i_count.
        ENDAT.
      ENDLOOP.
    ENDIF.
    Thanks
    Subhanakr

  • How to get page number from the PDF using Javascript

    Hi,
    We are having list of Single page PDF. The pdf are named in the order,
    ISBN_Author_01.PDF  (with real page number as i)
    ISBN_Author_02.PDF  (with real page number as ii)
    ISBN_Author_03.PDF  (with real page number as iii)
    ISBN_Author_04.PDF  (with real page number as 1)
    ISBN_Author_05.PDF  (with real page number as 2)
    ISBN_Author_06.PDF  (with real page number as 3)
    ISBN_Author_nn.PDF  (with real page number as 500)
    Here each pdf has a page number and in sequential order.
    The task is to check whether all the pdfs are in sequential order (i.e i, ii, iii, 1, 2, 3). If any page is missing, the script should throw an error report.
    To do this task, I am writing a Javascript to get the real page number from the PDF.
    Can anybody help me how to get the page number from the PDF using Javascript.
    Thanks,
    Gopal

    The "real" page number within a PDF is the count of the physical page starting at 0, zero.
    pageNum numPages
    The number printed on each page is the page label.
    setPageLabels  getPageLabel
    You will have to open each PDF and your script would need to know the page label for that file. I would expect you would need to build a 2 dimensional  array of the file names and the page label for the page within that array.

  • How to get week number from date

    Hi,
       please mention how to get the number of week from a particular date using fn module?

    Hi Debarshi,
                       Use FM <b>DATE_GET_WEEK</b>
    Reward points if helpful.
    Regards,
    Hemant

  • Can you get IMEI number from device ID

    Dear all,
    We have had a user who's phone was stolen so we are trying to get the phon blacklisted. We need the IMEI number but I don't have this obviously so I wondered if Apple can get the IMEI number from the device ID which I can get from office 365.
    Thanks for any help.
    Ed

    greenkomodo wrote:
    I can't unfortunately, we buy a hardware only device and don't register to a number so it isn't tracked on their system for the user what device they last used.
    If the phone was used on a cellular carrier, it is likely that, even though you didn't buy the phone from the carrier, that the IMEI registered with the carrier's system when the phone was activated.

  • Get IDoc-number from flat IDoc using dynamic configuration

    Dear experts
    In an IDoc2File scenario I have added the IDoc-number to dynamic configuration using the folling code in an UDF:
    DynamicConfiguration conf = (DynamicConfiguration)
    container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey FileName = DynamicConfigurationKey.create("http:/"+"/sap.com/xi/XI/System/File","DOCNUM");
    conf.put(FileName, a);
    The information is stored in the SOAP message
    <SAP:DynamicConfiguration SOAP:mustUnderstand="1">
      <SAP:Record namespace="http://sap.com/xi/XI/System/File" name="DOCNUM">0000000000012345</SAP:Record>
    </SAP:DynamicConfiguration>
    Can anybody tell me how I can access this information in the "variable substitution" section of the CC? Perhaps something like "message:docnum"?
    Additional information:
    Taking the IDoc-number from the payload using e.g. "payload:ORDERS05,1,IDOC,1,EDI_DC40,1,DOCNUM,1" does not work, since the XML-IDoc has been converted to an flat-IDoc.
    Thanks in advance for any good ideas
    Markus

    Dear Rodrigo and Sarvesh
    Thanks for your help so far! I applied your hints and now it is working fine.
    But now I have the following additional questions
    1.) My message mapping only maps the input IDoc to an output IDoc of the same type and structure. The MM is only required to process the UDF. Is there another, better solution to achieve my requirement that the IDoc-number shall be part of the filename?
    2.) In the CC you have the possibility to use temporary files (section "Processing", Option "Put File" = "Use Temporary File". I think this will not work with the given solution, will it?
    To possibly help somebody else or clarify the mechanism once again, I wrote down how my solution now looks like.
    My UDF in the message-mapping looks like this
    - Input = DOCNUM of IDoc, e.g. ORDERS05/IDOC/EDIDC/DOCNUM
    - Outpt = DOCNUM of IDoc, e.g. ORDERS05/IDOC/EDIDC/DOCNUM
    - UDF:
    public String putDynamicConfiguration(String docnum, Container container) throws StreamTransformationException{
    try
         DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
         DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
         String filename = "Prefix_" + docnum + ".txt";
         conf.put(key, filename);
         return docnum;
    catch (Exception e)
         return docnum;
    In the CC the settings are now as follows
    File Name Scheme = . -> only a dot or something else, because this field is obligatory, even if it is not used in this case.
    Variable substitution (...)
        Enable -> unchecked
    Adapter-Specific Message Attributes
        Use Adapter-Specific Message Attributes -> checked
        Fail If Adapter-Specific Message Attributes Missing -> checked
        File Name -> checked
        Directory, File Type, Temporary Name Scheme for Target File Name -> unchecked
    When I send an IDoc to PI and view the Adapte-Engine Version of the message (the SOAP-document, not the payload) I can find the Filename:
    <SAP:DynamicConfiguration SOAP:mustUnderstand="1">
    <SAP:Record namespace="http://sap.com/xi/XI/System/File" name="FileName">Prefix_0000000000012345.txt</SAP:Record>
    </SAP:DynamicConfiguration>

  • Getting a number from  (char)System.in.read

    I am very new to java so please forgive the seemingly basic question.
    When I try to simply get a number for input into a program, and I use (char)Sysytem.in.read(),
    it only gives me the acutual Keyboard number (ie.. 2 = 50, 1 = 49).
    Even when I try to parse an Integer using :
    public static void getNum( ) throws NumberFormatException
         char char1;
         String String1 = new String ("");
         int X;
         char1 = (char)System.in.read();
    while ( char1 <= '0' && char1 <= '9' )      
         String1 = String1 + char1;
         char1 = (char)System.in.read();
         X = Integer.parseInt(String1);
    System.in.read();
         return X;
         System.out.println(X);
    This gives me a usable number but if I try to use a decimal point in the number and convert it to a double, it wont work because the decimal wont read into the (char)System.in.read();
    Anyone have a suggestion ?

    Hope this helps - although haven't tried out your code.
    System.in.read() returns the next byte of information in the buffer, if the buffer is empty it'll prompt for input (passing control back to hardware/OS). Say the user types 10.56 and presses return - now the buffer has the information 10.56 plus a LF(line-feed) and and a CR(carriage return) character (this is how it is from DOS anyway) and control is passed back to your program which gets only the first byte of information from the buffer, which in this case would represent the character '1', only it doesnt get back the character '1', it gets an int type which represents the byte of information which represented the character '1' to your hardware/OS system (which I believe is decided by the machine local encoding system).
    By casting this int to a char by the expression
    (char) System.in.read()
    its converted to the original character that the int represented from the buffer
    If you were using System.in.read() only you would have to reconstruct the input as a String by concatenating the char's one by one only ignoring the last 2 bytes of the buffer (which captured the LF and CR).
    Say you had the resulting String from the above reconstruction in the variable s1,
    you could then attempt to convert the resulting String to a floating-point type (say a double) using
    d = Double.parseDouble(s1)
    where d was a double type (as mentioned by abnormal)
    You'd have to put this in a try/catch statement because the user could type something invalid like 10.6a5
    which would cause the parseDouble() method to throw an exception which unless you handle it yourself will cause your program to abend with a NumberFormatException.
    This all seems to be a lot of hard work for input apparently so simple, which is why abnormal suggest using a BufferedReader to overcome the problem of 'manually' stripping the CR and LF from the input leaving you with just a String. I must admit I'm not sure of why abnormal's code wouldn't work for you. But I thought I'd post this anyway because you might find the background info helpful.

  • How can I get Notification Number from Material Document?

    Can you please tell me that how can I get Notificatin Number(QMEL-QMNUM) from Material Document(MSEG-BELNR)?
    Regards,
    Subhasish

    This question is closed but unanswered.

  • Applescript to get phone number from name

    Hi, I am trying to make an applescript that will simply return a phone number from contacts when given a name. It is part of a larger script, but everything else is already working. It seems like it would be pretty simple, but nothing that I have tried will work.
    Here is my best guess:
    tell application "Contacts"
    get phone of "John Doe"
    end tell
    I just need to set a variable to equal the phone number that is returned. Thanks in advance.

    Hello
    You may try something like this.
    set n to "John Doe"
    tell application id "com.apple.AddressBook"
        set p to value of phone 1 of (person 1 whose name = n)
        set q to {label, value} of phones of (people whose name = n)
        set r to value of phone 1 of (person 1 whose name = n) whose label = "home"
    end tell
    return {p, q, r}
    Note that database may contain multiple records for the same person name and a person's record may contain multiple phone numbers.
    Tested with AddressBook 5.0.3 under OS X 10.6.8.
    Regards,
    H

  • Relation EQUI EQUI- EKKO to get PO number from EKKO

    hi,
    i would like to take the PO number (from EKKO-EBELN) starting from the SERNR in the EQUI, what is the relation? there are some functions?
    thanks

    my guess:
    EQUI-SERNR ==> EQUI-MATNR = EKPO-MATNR => EKPO-EBELN (=EKKO-EBELN)

  • Getting quotation number from service order

    hi
      i have a situation where i need to find the quotation number created by DP80 from a service order.
        i'm able to find service order number from quotation but that does not solve my problem. i need to find the quotation number from service order number.
       pl help.
    thanks in advance

    hi Koustav,
        I'm in same situation as yours. i need to update preceding Qutation from the service order and only  if a precticular item category is precent in service order.
    As u have already worked on Qutation n service order stuff.. can u plz suggest me some thing.
    thanks in Advance

Maybe you are looking for

  • IMPORT Options in ITUNES:Settings,+16-bit OR 8 Bit??

    I have been importing my store-bought CD's into my ITUNES,..IMPORT SETTINGS>>>>>>>> there are several selections, *AIFF(my favorite),(as I want full, ROBUST-sound (I have the computer space...... *MP3, or *WAV or *Losless... trouble is..I'm getting c

  • Using the soft front panel to take a differenti​al measuremen​t.

    I have a PXI- 5152 digitizer and need to use the soft front panel to take a differential measurement. I found how to do this by programmatically, but cannot figure out how to do this  on the soft front panel. Can anyone help?

  • ORA-26723: user "STRMADM1" requires the role "DBA"

    I granted dba to the streams adm user but sqlplus still complains: sqlplus / as sysdba SQL> grant dba to strmadm1; Grant succeeded. SQL> conn strmadm1/xxxxx Connected. SQL> BEGIN add_capture_rules('TABLE1','capture_db1','strmadm1','emsuser'); END; 2

  • JNI freeing local references

    We're using JNI to receive data from a native callback function. The native side creates local references, but does not use the DeleteLocalRef function. This works fine with the SUN JRE. However, the IBM JRE gets a stack overflow exception. According

  • Clipboard functionality and Multi Value in an attribute of component WD_SELECT_OPTIONS_20

    Hi All, Clipboard functionality and Multi Value in an attribute functionalities are not working. I tried to look into the standard component and could not found relevant piece of code. Our system is on 7.3 EHP1 SP9 but functionality does not seem to