How to convert the number in time

Hai All

How to convert number of datetime function

I have number 0825 in a table t1 and another table, I have a column of type date

How can I subtract

0825 respondent

Concerning

Srikkanth.M

Published by: Srikkanth.M on April 3, 2010 01:18

Try

SELECT (
         INTIME
         -
             TO_DATE(TO_CHAR(Intime,'DD-MON-YYYY')||' '||
             TO_CHAR(0825,'0000'),'DD-MON-YYYY HH24:MI')
        ) * 24*60 time_diff
FROM   T1;

* 009 *.

Tags: Database

Similar Questions

  • How to convert the number and time of storage in my table

    Hai all

    I have a table called present in that certain fields are

    Code varchar

    Name varchar

    Date of the respondent

    outtime date

    eTime number

    number of wtime

    number of cutmin


    SO I Wtime calculated by Outtime sub - intimate and now I need to calculate the time additional IE Etime

    So for all employees working hours are 0830 so I need for less 0830 train employees working hours

    How can I convert this at 0830 and sub with Wtime and to get the exact time


    Thanks in advance

    srikkanth. M

    Hello!

    Outtime - intimate is a figure which means days

    0830 8.5 hours and that's 1/24 * 8.5 days.

    Lets say I work today between 0700 and 1510

    Follow my example

    SQL> with data as (
      2    select to_date('02.04.2010 15:10','DD.MM.YYYY HH24:MI') outdate ,
      3           to_date('02.04.2010 07:00','DD.MM.YYYY HH24:MI') indate ,
      4           1/24 * 8.5 need_to_work from dual )
      5  select round((outdate - indate - need_to_work) * 1444) etime_in_minutes from data
      6  /
    
    ETIME_IN_MINUTES
    ----------------
                 -20
    
    SQL> 
    

    Again you can now convert minutes to hours or test whether etime is negative or what...

    Then in your case update statement would be

    update attendance set etime = round((outtime - intime - 1/24*8.5) * 1444) where 
    

    T

    Published by: ttt on 1.4.2010 22:17

  • How to convert the number to SQL?

    How can I convert the number in SQL?
    The problem is that I use .NET and the Oraclenumber seems to be too big.

    Number of database - what I get when I select
    -----------'12'--------------------------------------'12'
    -12, 1-12, 10' <-this 0 should not be there
    -----------'12,12'-----------------------------------'12,12'
    -12, 123'---12, 1230' <-this 0 should not be there
    -----------'12,1234'-------------------------------- '12,1234'


    I don't know why this happens?

    Now, I tried to select with to_char (COLUMN1), but when I have values like "' 0,15 ' in the base, I get in select ', 15' when I convert with to_char?"

    Anyone know a solution?

    Kind regards
    Simon

    Edited by: user3654758 the 30.09.2010 02:02

    with mytable as
    (select 12 n of all the double union)
    Select 12.1 in union double all the
    Select 12.12 in union double all the
    Select 12.123 in all the double union
    Select double 12.1234)
    Select case when trunc (n) = n then
    TO_CHAR (n, 'FM9999999999999999999')
    on the other
    TO_CHAR (n, 'FM9999999999999999999D9999999')
    end
    FROM MyTable;

    Edited by: hartmutm the 30.09.2010 02:21

    I changed it a bit, because you have a problem with the separator decimal escape in the previous code.

  • How to convert the number in months?

    Hi friends

    I have data in the table like this

    Month

    01

    02

    03

    04

    I want to convert in months. e, g

    01 if it should appear January

    02 if it should appear February

    What is the SQL query? Help, please.

    rgads

    with

    months as

    (by selecting '01' mnth throughout double Union

    Select '02' of any double union

    Select '03' in double union

    Select '04' double

    )

    Select mnth, to_char (to_date (mnth, 'mm'), 'Month') mnth_name

    of the month

    MNTH MNTH_NAME
    01 January
    02 February
    03 March
    04 April

    Concerning

    Etbin

    misread - must be a number

    with

    months as

    (select 1 month of all the double union)

    Select 2 Union double all the

    Select 3 in all the double union

    Select 4 double

    )

    Select mnth, to_char (to_date (to_char (mnth), 'mm'), 'Month') mnth_name

    of the month

  • How can I limit the number of times a number is used in its range at random?

    Hello everyone.

    This is my first post on the Adobe forums so please bear with me if I violate the unwritten rules of "best practices".

    Here's what I'm trying to achieve:

    • Create a grid of 12 x 9;
    • Fill cells with random numbers, ranging from 1 to 9;
    • Assign a symbol (custom chart) for each cell that is dependent on what random number is generated
    • Limit the number of times each random number is 12.

    My question is simple: how, using AS3, create a random numbers function that will use that each number in its range a maximum of 12 times (it is important to note that my template includes 108 cells using the numbers from 1 to 9 exactly 12 times each)? So, for example, if the random numbers function fills the 12 cells with the number '4', it will be then exclude the number of remaining iterations.

    I am adhering to standards-oriented programming script OBJECT including in frames of the actual chronology is not desirable. Thanks in advance to anyone who is willing to offer me a few minutes of their time to help out me!

    create an array with all the elements:

    12 times 1, 12 2...

    You can do this easily with curls...

    and then mix this table...

  • How create a visible counter that reflects the number of times a form is submitted?

    I have a form that I want to count the number of submitions and I want so that it can be displayed in my Web page. Any ideas?

    You don't need a database if you want to only count the number of times that a request has been sent.

    What you need is a text file called counter.dat or similar and place the code in the form Manager to open the file and place a new value in the file.

    If you have PHP code will look like

    $cf = "counter.dat";
    $fp = fopen($cf,"r");
    $ct = trim(fread($fp,filesize($cf)));
    if ($ct != "") $ct++;
    else $ct = 1;
    @fclose($fp);
    $fp = fopen($cf,"w");
    @fputs($fp,$ct);
    @fclose($fp);
    

    GRAMPS

  • How to adjust the number of rings on 6s before answering iPhone begins

    How to adjust the number of rings on iPhone 6s before the beginning of voicemail?

    Contact your operator. That is controlled by them. It is not based on the number of rings, it is based on time.

  • How to find the number of data items in a file written with the ArryToFile function?

    I wrote a table of number in 2 groups of columns in a file using LabWindows/CVI ArrayToFile... Now, if I want to read the file with the FileToArray function so how do I know the number of items in the file. during the time of writing, I know how many elements array to write. But assume that I want the file to be read at a later time, then how to find the number of items in the file, so that I can read the exact number and present it. Thank you all

    Hello

    I start with the second question:

    bytes_read = ReadLine (file_handle, line_buffer, maximum_bytes);

    the second argument is the buffer to store the characters read, so it's an array of characters; It must be large enough to hold maximum_bytes the value NULL, if char [maximum_butes + 1]

    So, obviously the number of lines in your text tiles can be determined in a loop:

    Open the file

    lines = 0;

    While (ReadLine () > 0)

    {

    lines ++;

    }

    Close the file

  • How to convert the precision extended float to float in C++

    Hello

    Could someone me please how to convert the extended precision (floatExt) float normal float in C++?

    What is the difference in the float between Labview and C++ data type?

    When I tried to receive a range of float of a function of the DLL generated by Labview in C++, data are bad.

    Thank you

    Victor King

    You can search for numeric data types in LabVIEW help for more information on the different types of data. Before sending the data to the C++ application, you can use the function of Double precision on digital / range of Conversion to convert number to Double precision.

  • Convert the number to a HEXADECIMAL 4-digit string

    Hello

    I would like to know if it is possible to convert a number to a HEXADECIMAL string 4 digit.

    Now I convert the number to a table with ' generation array "and this table that I convert it with an"array of bytes to a string.

    While when I type in the number 30, the channel will show 1E (HEX, 2 digits).

    But when I type a number greater than 255, it continues to show FF (255)

    If I do the 'picture to build' bigger and add an element, the string indicates a 4 digit Hex number.

    Now, I would like to know how I can show one number, greater than 255 in the chain with 4 digits.

    So I actually need to divide the number in 2 tables before building the table, isn't it?

    I hope that you understand my purpose?

    So when I type in "1235", I want a string indicating "04E5" and not "FF".

    The function that you want to use is number to a hexadecimal string. Set the width of 4

    http://zone.NI.com/reference/en-XX/help/371361H-01/Glang/number_to_hex_string/

    Moreover, 0x04E5 is decimal 1 253

  • How to convert a number to a 10-bit array that will go in an external DAC (AD7533)

    Hello

    This here is my situation.  I'm using with LABVIEW to program a CPU in the following way:

    1 Laview calculates the values of a sine wave, according to the number of loop iteration. (i.e. generating a value of the sine at different frequencies).

    2. it is adjusted between-/ + 1.

    3. I connect an array of digital output ports to an external, independent, four quadrants, 10 - bit DAC. The part is AD7533, and I hope I can use it in bipolar configuration.

    My question is, how do I convert the number of sine wave (or triangal, sqr, etc.) in a table of values of T/F can I stream through my DAC and output a sine wave signal?

    I tried number Boolean array with the calculated value of sinus, but do not give me any bits of hard.

    All suggestions greatly apprec.

    RTom

    Post what you have done so far.  Are starting you with a a U16 or I16 whole bit (or more)?  How do you do the scaling between +/-1 and an integer.  It should be just a matter of using the table number of Boolean and then using a subset of the table to reduce up to 10 items boolean.  If you are starting with an integer I16, it may be a matter of taking the element of corresponding table of the sign bit and the 9 elements that correspond to the less significant bits, to put together to make an array of 10 elements.

  • Unable to activate Windows 7 error "license exceeded the number of times that it can be installed"

    Original title: Windows 7 Family Pack limit excided.

    I have a window 7 Family Pack update 3 pcs.  I installed 2 licenses, and when I went to install the third time, he said that the key is not valid.  I went through the phone activation home says the license has exceeded the number of times where it can be installed.  I had to reinstall on a computer a second time after a virus problem.  I think that it why Microsoft thinks that all licenses have been used.  How can I fix it?

    Thank you

    This isn't an uncommon problem, usually a phone call and talk to someone live will fix it.

    1) click Start and in the search for box type: slui.exe 4
    (2) press the ENTER"" key.
    (3) to select your "country" you are in the drop-down list.
    (4) choose the option "activate phone".
    (5) stay on the phone * do not select/press any option * and wait for a person to help you.
    (6) explain your problem clearly to the support person.
    (7) the person must give you a confirmation ID, copy it down on paper,
    (8) check that the ID is correct in reading the support person.
    (9) to enter the ID number, then click 'Next' to complete the activation process.

    Activation and registration of a Microsoft product
    http://support.Microsoft.com/?kbid=326851
    Windows activation: (888) 571-2048
    (888) 725-1047 or 800-936-5700

    Microsoft Activation centers worldwide telephone numbers:
    http://www.Microsoft.com/licensing/existing-customers/activation-centers.aspx
    (This site is for activating Volume License, but if you call, they will help you)

    The phone number is not working:
    Microsoft Worldwide contacts: http://www.microsoft.com/worldwide/default.aspx

    J W Stuart: http://www.pagestart.com

  • Is there a limit on the number of times you can use the recovery CD

    I have a desktop a6242n and the failed hard drive, I installed a new and inserted the recovery CD and it comes up with the message that this is not the correct CD for this computer. I made them when I first got the computer and used without problem. Is there a limit on the number of times I can use the recovery CD? If I buy a new game that will work?

    Hello

    There is no limit to how many times you can perform a recovery from the discs. The issue is likely because the hard drive does not have DMI information loaded on it. You will perhaps call HP and order a set of recovery disks and ask them to guide you through access to tools on the recovery disk to reload this information on the disc, assuming they are available.

    Good luck!

  • How to determine the number of characters in a PDF file?

    Acrobat.com, how to determine the number of characters or words in a PDF file?

    Hi unk2,

    There is no feature in Acrobat.com online services to a number of characters. But, you could use ExportPDF to convert your PDF files to Word format and then create your character count in Word.

    Please let us know if you need help.

    Best,

    Sara

  • Show on a text field, the number of times click us a Butoon

    Hi there... I did some work... and my teacher told me to do an exercise... but I wonder just for your opinion and help

    Here is that the problem... I managed to create a code to print text as soon as I click the butoon, here it is:

    botao.addEventListener(MouseEvent.CLICK, mostrartexto);
    
    function mostrartexto(event:MouseEvent){
              caixadetexto.text = "Hi there World";
    }
    

    So the thing is now... that... instead display the text by clicking the botoon I need to click on the butoon and it must indicate the number of times where I clicked on the text field.

    That means... I click it will show me '1' or '1 click', '2' or ' ' clicks... and so on.

    So, if there is someone who could help me and explaing how... or if it is even possible

    Cordially ASilva

    use a variable to store the number of clicks of buttons:

    var botaoClickNum:int = 0;

    botao.addEventListener(MouseEvent.CLICK, mostrartexto);
    
    function mostrartexto(event:MouseEvent){botaoClickNum++;           caixadetexto.text = botaoClickNum.toString();
    }
    
    

Maybe you are looking for