How to convert Datetime in number?



SELECT c.chg_date_time, TO_DATE('01011900','DDMMYYYY') + CHG_DATE_TIME OF CHNGHIST C

After that, run:
2010-03-30 11:48:29

In the above query, convert us number to datetime.

Now, I want to convert Datetime in number.

i.e., 03-30-2010 11:48:29 =? (40265.492)

Thank you

Simply activate your expression.

not tested

SELECT to_date('30/03/2010 11:48:29','dd/mm/yyyy HH24:mi:ss')-TO_DATE('01011900','DDMMYYYY') FROM dual;

Tags: Database

Similar Questions

  • How to convert string to number in TS?


    Anyone know how to convert string to number in TS?

    I couldn't find the Num() function.

    Thank you


  • How to convert datetime in a JSF page or within the object entity of seconds since 1970

    Please HELP I have a column of type bigdecimal seconds since 1970 representing datetime.

    for example



    expected output for the datetime type is 2012-04-02 16:04:29

    I build JSF form that display the column DateTimeCol. DateTimeCol type and Date format

    YYYY-MM-DD hh: mm: but the output of the column DateTimeCol is 9616-11-09 03:09:06 and it won't.

    I do not know how to convert (1333382669.06 seconds since 1970) in datetime (2012-04-02 16:04:29)

    I'd appreciate your help.

    Your problem is that the date data type coming milliseconds and not in seconds. You should be abel to do the math and use a

    java.util.Date(your_sec*1000).tostring ();

    Google for a timestamp converter (e.g. Epoch Converter - Unix Timestamp converter) and enter your number

    Entry 1333382669.06 * 10 = 1333382669060 lets you get: (here I use only * 10 that you already have 1/100th of a second!)

    Assuming that this timestamp is in milliseconds:

    GMT: Sunday, March 24, 1974 06:24:26 GMT


  • How to convert date to number


    How to convert the date as a number.

    Thanks and greetings

    srikkanth. M

    Look at these messages
    Please help me in converting Format of Lilian date
    converstion to date
    and try something like that.

    SELECT sysdate,sysdate-to_date('15-10-1582','DD-MM-YYYY') lilian_dt FROM dual;
  • How to convert a large number to the spell without truncate to 32-bit.

    I'm trying to convert a hexadecimal number (string). The number is truncated to 32 bits, which is not what I want. For example, the number 28037546508295 (double) must be 0 x 198000000007. LabVIEW truncates and the resulting string is 0x7FFFFFFF, using number of Hex I'm stuck. Thank you.

    'Number of hexadecimal string' accepts only data of I32. So, you should see a red dot of coercion when you connect your floating point number.

    You must use "Format of value" (also in the String > number of rope/coercion-pallet) and use '%x' as a format string.

    hope this helps,


  • How to convert DateTime xml in xdp (Designer)?

    Hi, I want to convert DateTime format an XML in the designer, the value DateTime in xml format is NOT in common format YYYY-MM-DD (if it is in a common format, can I do this with pattern)

    I have a 'DateTime' field in Xdp can obtain Xml date and time:

    In XML < DateTime > DD-MM-YYYY < / DateTime > I want to convert in XDP in DateTime Field in 'April-DD-YYYY ".

    Can I do this?

    You can do this way...

    Bind the date field in your XML tag.

    Set the model display to the date field.

    Place the following code in the initialize event of the date field.

    The value JavaScript as a language.

    var dtStr = this.rawValue;
    var pos1 = dtStr.indexOf ("-");
    var pos2 = dtStr.indexOf ("-", pos1 + 1);
    var strMonth = dtStr.substring (0, pos1);
    strDay = dtStr.substring var (+ 1 pos1, pos2);
    var strYear = dtStr.substring (pos2 + 1);

    Assign the value to put in shape to the Date field.

    this.rawValue = strYear + '-' + strMonth + '-' + strDay.

    Thank you


  • How to convert a serial number?

    I got a number on the box and another number on the sleeve. where should I go to convert a number to a valid serial number to register?

    Hi wendellw,

    If you have received the redemption code, then you should go online at to redeem your serial key

    However, if it's a 24-digit code, then that must be the serial key that you can use to update the licensed software.

    Kind regards


  • How to convert this statement number

    Hai All

    I need to convert my data to a data type of number, and I need to insert

    I have my table T1 respondent date and date declared I need to take the time time - intimate and I need to update my table field W_time declared under the number of outtime

    I tried but it dosnt works... It works for char data types

    Update dail_att set wtime = to_char (to_date('00:00:00','HH24:MI:SS') +)
    (outtime - intimate), 'HH24:MI:SS');



    Hi Ali,

    Did you remove ':' in HH24MISS and checked?

    Any specific error?

    SQL> create table num
      2  (n number);
    Table created.
    SQL> insert into num values(1);
    1 row created.
    SQL> update num
      2  set n =  select to_number(to_char(to_date('00:00:00','HH24:MI:SS')
      3   +
      4   (sysdate-to_date('11-JAN-10')),'HH24MISS')) dt
      5   from dual;
    set n =  select to_number(to_char(to_date('00:00:00','HH24:MI:SS')
    ERROR at line 2:
    ORA-00936: missing expression
    SQL>   update num
      2   set n =  (select to_number(to_char(to_date('00:00:00','HH24:MI:SS')
      3    +
      4    (sysdate-to_date('11-JAN-10')),'HH24MISS')) dt
      5    from dual);
    1 row updated.
    SQL> select * from num;


  • How to convert Date floating number

    Hi everyone, I want to make a time measure of the hall sensor and use that value to set a frequency, and also to use as the value of process in a PID controller. the problem is that I get a result of dynamic data and I would like to have this in a floating number, is that possible? or another way is also good... hereby a jpeg to make it more clear.

    I also have more problems with that, when I change the throttle (0-100%) is does nothing and my time loop also doesn't stop more. This is just a small part of the full program, it's may be heavy for my computer? (core 1, 6 GHz, 1, 5gig of ram)

    hope it's a bit clearer what I mean

    Thanks in advance!

    PS: I know that the fracture by one is useless because you can directly measure the frequency, which has already changed.

    the program is intended to push a PMSM motor

    You can change the type of dynamic data for the meter using the function of Double-precision float in the digital - Conversion scheme.  For your other question, you are not showing your loop together so I can't help you there.  What stops the loop?

  • How to convert string to number

    Hi everoyne, I need to make a program simple calculation of the GPA in 5 classes. Where A, B, C, D, F are the entries for each other...

    Here's what I've done so far.

    But it seems that it is not recognized when I assigns numeric values to each letter. So I would appreciate any help. I tested for the release of "GP" and input A (4) = CT. The answer for GP should be 4 x 3 = 12. But I get a number beyond that.

    I'm relatively new to Labview so sorry if this is a stupid question.


    I would like to make a table of the clusters.  Each element of the array corresponds to a single course.  Inside of the bunch, I would have a string for the name of the course, an enum for the grade and a digital for the number of credit hours.  Use an enum for the grade, so you can make sure that the user space only in the values that you no longer the enum is actually a number.  No actual conversion.  Then you just use a loop FOR (autoindexing) including some shift registers to keep your totals, then divide the totals of the year by the credit hours.

  • need to convert a 6 000 pdf to Excel files. How to convert a large number of PDF files at once

    Have a large database of PDF reports I need to export to Excel in order to build a searchable database effectively

    Can I do in Acrobat in large volume and just leave the machine agree with it or not.

    Acrobat Pro has 'actions', but they are designed for the automation of the light trucks. I recommend you do not more than 200 at a time, leaving Acrobat between each of them.

    However, I must comment on the premise. Conversion to Excel is a very uncertain task, based on conjecture and rarely is exactly what is needed. Individual inspection of each file Excel with adjustment, rejection or leisure is usually considered a must.

    If you have a large number of identically to the PDF format, you must look or an application that is designed to extract based on this provision, rather than leaving to the conjecture of the commission.

  • How to convert a decimal number to this day?

    select to_date('09:40:00','hh24:mi:ss')  - to_date('08:15:00','hh24:mi:ss') from dual;
    This code generates this number:.059027778
    I want this number to represent the difference between the two time in hours and minutes

    urgent please

    Thank you

    There is nothing urgent in this forum...

    select numtodsinterval (to_date('09:40:00','hh24:mi:ss')  - to_date('08:15:00','hh24:mi:ss'), 'day') from dual;
  • 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



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


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

    * 009 *.

  • How to convert number in date and time in labview

    Hi all

    I have a hexadecimal string and converted into a number. Now this number to display in the format of timestamp. Uses the format of the time Unix.

    By using this link, I can convert this number to timestamp.

    But how it should be done in LabVIEW? I know it may be simple, but please help.

    I enclose my VI for referance.

    Thank you


    Hi Man_Can,

    You can add the origin of UNIX timestamp to your number:

  • How to convert a string to a number?

    How to convert a numeric string to a number of TestStand?

    Use Val().

    Example Val (Locals.myString)

Maybe you are looking for