How to convert short timestamp to long time stamp.?

Can anybody help on converting a short time stamp into long timestamp?
Regards
Nitin

Hi,
CONVERT: DATE p_date TIME p_time INTO TIMESTAMP l_timestamp TIME ZONE sy-zonlo.
thanks\
Mahesh

Similar Messages

  • How to convert a timestamp to date/time in CDS View?

    Dear experts,
    I would like to convert a timestamp to a date and time within a CDS view.
    This is what I tried to do:
    Cast (Cast(<timestamp> as abap.dec(8,0)) as abap.dats) as <date>
    I also thought about first converting the timestamp into a plain numerical character, then using substring and then casting it to abap.dats. Then its giving me an error that says: "dec can't be converted into numc".
    The above written code also throws an error - "function not allowed/ no cast within a cast".
    It is quite nasty not being able to write a cast within a cast - how else am i supposed to achieve a date here?
    I am looking forward to have your answers!
    Thanks and BR
    Anja

    Hi Anja,
    what you try to do is currently not possible, a feature not available in CDS views.
    Yet it surely is a feature, ABAP developers would like to see on the feature request list .
    Cheers,
      Jasmin

  • How to convert oracle timestamp to java timestamp

    Hi,
    I need to convert oracle timestamp that i got from oracle database to java timestamp.I tried to use getTimestamp() to get timestamp value from oracle, but am getting NumberFormatException.
    Could any of suggest how to convert oracle timestamp to java timestamp.

    Thanks jverd ,
    then my code will be like:
    String oracleTS="11-MAR-05 11.19.20.625 AM";
    // am looking for yyyy-MM-dd HH:mm:ss format
    SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd
    HH:mm:ss");           
    Timestamp javaTimestamp=Timestamp.valueOf(oracleTS);
    System.out.println("javaTimestamp----->>
    "+javaTimestamp);
    ving java.lang.NumberFormatException: For input
    string: "MAR"Well, the SimpleDateFormat has to actually match the format you're trying to parse, for one thing. Then you have to actually USE the SDF, which you didn't.
    You really haven't made it clear what you're trying to do, and it doesn't appear that you bothered to study the links I provided.
    DateFormat df = new SimpleDateFormat("dd-MMM-yy HH.mm.ss.SSS aa");
    Date date = df.parse(oracleTS);
    Timestamp ts = new Timestamp(date.getTime());

  • How do I find the date and time stamp on pictures?

    How do I find the date and time stamp for my pictures?

    The Photos app will not do this but other apps will. iPhoto has an icon that when tapped with the photo open will show the EXIF information you are looking for. iPhoto is not free but you can purchase it in the App Store.
    There may be other photo apps that provide this information as well.
    PhotoForge2 will show the EXIF data as well as the GPS data if it is available.

  • How to convert normal timestamp to julian timestamp in oracle

    Hi Friends
    How can i convert normal timestamp to Julian Timestamp in Oracle ?
    Thanks for your help

    Hi Chris,
    I dont have any idea on this. But need clarification on your query.
    When I executing below query I'm getting same output. 'J' will give only Julian day right not the timestamp. Please correct me if I am wrong.
    SQL> select to_char(systimestamp,'J') J,to_char(sysdate,'J') from dual;
    J            TO_CHAR
    2456631   2456631
    http://en.wikipedia.org/wiki/Template:JULIANDAY.TIMESTAMP

  • How to convert Works doc no longer having Works?

    I have been sent a large Works document. No longer having Works, I am trying to figure out how to convert it into .rtf of some other form that is readable.

    Since you've posted in the AppleWorks forum, by "Works" I assume you mean AppleWorks. There are a few options to get to the contents of that file.
    The easiest & most reliable option other than using AppleWorks or Pages 4 or earlier would be to open the file with LibreOffice. It's a free, open source, Office clone that does a very good job of opening AppleWorks & ClarisWorks files. You can then save them as RTF or Word.
    Second would be to open the file with TextEdit that comes with OS X. You will get a lot of "garbage" formatting text before & after the actual text. That formatting can be many pages long.
    Third would be to look at the options available from Panergy Software. They do have demo software to try.

  • How to tune this SQL (takes long time to come up with results)

    Dear all,
    I have sum SQL which takes long time ... can any one help me to tune this.... thank You
    SELECT SUM (n_amount)
    FROM (SELECT DECODE (v_payment_type,
    'D', n_amount,
    'C', -n_amount
    ) n_amount, v_vou_no
    FROM vouch_det a, temp_global_temp b
    WHERE a.v_vou_no = TO_CHAR (b.n_column2)
    AND b.n_column1 = :b5
    AND b.v_column1 IN (:b4, :b3)
    AND v_desc IN (SELECT v_trans_source_code
    FROM benefit_trans_source
    WHERE v_income_tax_app = :b6)
    AND v_lob_code = DECODE (:b1, :b2, v_lob_code, :b1)
    UNION ALL
    SELECT DECODE (v_payment_type,
    'D', n_amount,
    'C', -n_amount
    * -1 AS n_amount,
    v_vou_no
    FROM vouch_details a, temp_global_temp b
    WHERE a.v_vou_no = TO_CHAR (b.n_column2)
    AND b.n_column1 = :b5
    AND b.v_column1 IN (:b12, :b11, :b10, :b9, :b8, :b7)
    AND v_desc IN (SELECT v_trans_source_code
    FROM benefit_trans_source
    WHERE income_tax_app = :b6)
    AND v_lob_code = DECODE (:b1, :b2, v_lob_code, :b1));
    Thank You.....

    Thanks a lot,
    i did change the SQL it works fine but slows down my main query.... actually my main query is calling a function which does the sum......
    here is the query.....?
    select A.* from (SELECT a.n_agent_no, a.v_agent_code, a.n_channel_no, v_iden_no, a.n_cust_ref_no, a.v_agent_type, a.v_company_code,
    a.v_company_branch, a.v_it_no, bfn_get_agent_name(a.n_agent_no) agentname,
    PKG_AGE__TAX.GET_TAX_AMT(:P_FROM_DATE,:P_TO_DATE,:P_LOB_CODE,A.N_AGENT_NO)  comm,
    c.v_ird_region
    FROM agent_master a, agent_lob b, agency_region c
    WHERE a.n_agent_no = b.n_agent_no
    AND a.v_agency_region = c.v_agency_region
    AND :p_lob_code = DECODE(:p_lob_code,'ALL', 'ALL',b.v_line_of_business)
    AND :p_channel_no = DECODE(:p_channel_no,1000, 1000,a.n_channel_no)
    AND :p_agency_group = DECODE(:p_agency_group,'ALL', 'ALL',c.v_ird_region)
    group by a.n_agent_no, a.v_agent_code, a.n_channel_no, v_iden_no, a.n_cust_ref_no, a.v_agent_type, a.v_company_code, a.v_company_branch, a.v_it_no, bfn_get_agent_name(a.n_agent_no) ,
    BPG_AGENCY_GEN_ACL_TAX.BFN_GET_TAX_AMOUNT(:P_FROM_DATE,:P_TO_DATE,:P_LOB_CODE,A.N_AGENT_NO),
    c.v_ird_region
    ORDER BY c.v_ird_region, a.v_agent_code DESC)
    A
    WHERE (COMM < :P_VAL_IND OR      COMM >=:P_VAL_IND1);
    Any idea to make this faster....
    Thank You...

  • How to convert clob column to long

    Hi,
    Is there any way to convert clob column to long.
    Here below is my scenario..
    Instead of using substr function
    CREATE OR REPLACE PROCEDURE proc AS
    sql2 clob := '';
    sqlstring1 LONG;
    sqlstring2 LONG;
    sqlstring3 LONG;
    sqlstring4 LONG;
    sqlstring5 LONG;
    sqlstring6 LONG;
    sqlstring7 LONG;
    sqlstring8 LONG;
    sqlstring9 LONG;
    sqlstring10 LONG;
    BEGIN
    FOR sql1 IN (SELECT info FROM emp)
    LOOP
    sql2 := sql1.sql_string;
    sqlString1 := dbms_lob.SUBSTR(sql2, 8000, 1);
    sqlString2 := dbms_lob.SUBSTR(sql2, 8000, 8001);
    sqlString3 := dbms_lob.SUBSTR(sql2, 8000, 16001);
    sqlString4 := dbms_lob.SUBSTR(sql2, 8000, 24001);
    sqlString5 := dbms_lob.SUBSTR(sql2, 8000, 32001);
    sqlString6 := dbms_lob.SUBSTR(sql2, 8000, 40001);
    sqlString7 := dbms_lob.SUBSTR(sql2, 8000, 48001);
    sqlString8 := dbms_lob.SUBSTR(sql2, 8000, 56001);
    sqlString9 := dbms_lob.SUBSTR(sql2, 8000, 64001);
    sqlString10 := dbms_lob.SUBSTR(sql2, 8000, 72001);
    EXECUTE IMMEDIATE sqlString1 || sqlString2 || sqlString3 ||
    sqlString4 || sqlString5 || sqlString6 ||
    sqlString7 || sqlString8 || sqlstring9 ||
    sqlstring10;
    END LOOP;
    COMMIT;
    END proc;
    Any help really appreciated
    Thanks

    We cannot execute clob dynamically.That's what I said: execute immediate doesn't support CLOB!
    But you can concatenate two long's:
    SQL> DECLARE
       l_stmt1   LONG;
       l_stmt2   LONG;
    BEGIN
       l_stmt1 := RPAD ('BEGIN ', 32500, ' ');
       l_stmt2 :=
           RPAD ('  dbms_output.put_line(''Hello World'');', 32500, ' ')
           || 'END;';
       DBMS_OUTPUT.put_line ('Length of statement: '
                             || LENGTH (l_stmt1 || l_stmt2)
       EXECUTE IMMEDIATE (l_stmt1 || l_stmt2);
    END;
    Length of statement: 65004
    Hello World
    PL/SQL procedure successfully completed.So if you strip some extra spaces or try to compact your statement somehow, you might be able use above method.

  • How do I to get the date/time stamp back on my texts in ioS7?

    I've looked and looked to find an option and I can't seem to locate one.  Does anyone know how to put the date/time stamp back...?  It does appear in, but not consistently.

    Swipe right to left and they will appear as you need them.

  • How to copy Log text (with Date, Time stamp ) User IDfrom BP to Transaction

    Hi Experts,
                     Can someone guide us how  to copy Log text (with Date ,Time & User ID) fron Business partner  (Prospect) to transactions by text detrmination procedure.
    Regards,
    Basavaraj Patil

    save text
    Fill out following parameters of SAVE_TEXT function module:
    HEADER
    TDOBJECT C 10 BUT000
    TDNAME C 70 10 digit BP number
    TDID C 4 Z001
    TDSPRAS C 1 Language
    INSERT = ’X’
    LINES
    TDFORMAT TDLINE
    |
    |testtttttttttttttttttttttttt( Your text)
    I would suggest you to use some other BAPI that would attach your text to BP than SAVE_TEXT.
    If you still wanted to use SAVE_TEXT then first make sure how the TDNAME is generated. It depends on the text determination procedure. For examples, it can be guid of BP, GUID followed by date or time or else the BP number itself.
    Just go to BP transaction, double click on the text pad, it will open you the SAP Script editor. Click on menu GOTO and select Header which will give you info about your TDID, TDOBJECT, TDNAME....
    Hope this helps.

  • How to retrieve data Up to current time stamp

    From emp table i want to retrieve the data up to current time stamp how can i do this (up to current second)

    this link will help
    http://www.oracle.com/technetwork/issue-archive/2012/12-jan/o12plsql-1408561.html

  • How to start step/activity at particular time stamp / after delay

    Hello,
    Can we start a particular step/activity in workflow on specified time stamp.
    Like I want to start a step after 5 minutes of completion of other activity or can I start step execution on specified date and time.
    Thanks
    Regards,
    Nikhil

    This is really basic concept in workflow development. Open the workflow in workflow builder and then open the step. You will find there tabs called "Requested start", "Requested end" etc. You recommend that you take a look to these, and then read the corresponding parts of SAP online help.
    Basically the idea is that you e.g. set the time to "5 minutes after work item creation", or alternatively you can set a specific starting date/time (the date/time must be in a container element).
    Regards,
    Karri

  • How to convert string date to long (or Unix date)?

    I'm having difficulty in converting a user supplied date in the format mm/dd/yyyy to a long format such as 1035462807000. Since it's being entered by the user I can't just use the current system date. Any suggestions? Thanks!
    Dave

    Hi man, tsith Gave a good beggining, why dont you try the next code
    import java.text.DateFormat;
    import java.text.SimpleDateFormat;
    import java.text.ParseException;
    import java.util.Date;
    public class DateToUnix{
        public static void main(String args[]){
            getDateAsLong();
        public static void getDateAsLong(){
            String sStartDate = "12/01/2002";
            Date theDate;
            DateFormat sdf= new SimpleDateFormat("MM/DD/yyyy" );
            try {
                theDate = sdf.parse( sStartDate );
            }catch(ParseException e ){
                theDate = new Date();
            System.out.println( "Converted Start Date:" + theDate.getTime());
    }No mather how you get a Date object, the value you are looking for is a long, and you can get it from such object with the getTime() method.
    Take a look at the Java API @ [http://java.sun.com/j2se/1.4.1/docs/api/java/util/Date.html#getTime()]

  • Convert Unix timestamp to LabVIEW time

    Hello
    I need to convert a Unix timestamp comming froma dll to a LabVIEW time. Does anybody now some ready to use function for this?
    Thanks
    Solved!
    Go to Solution.

    DAckermann wrote:
    Oh yes. That was easy.
    Thank you very much!
    Exceot that there is a small possible gotcha. If you enter 1/1/1970 in a LabVIEW timestamp control and convert this to a double to get the number of seconds you likely end up with an error of your local timezone offset.
    Both the Unix and LabVIEW epoch are defined respective to GMT which for most practical purposes is the same as UTC. So you have to make sure to get the number of seconds for a timestamp that shows 1/1/1970 00:00 UTC to be right.
    Spoiler (Highlight to read)
    If you ended up with 2082844800 as offset then you got it right.
    If you ended up with 2082844800 as offset then you got it right.
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • How to convert double to unsigned long integer for cRIO analog output?

    All,
    Having issues sending out my arbitrary waveform to my cRIO analog output. My values are doubles and by the time I send them out, they have been converted to U32 values and are all turning out as zeroes. This led me to assume two things: 1) That cRIO analog output can only output integers since the values need to be deployed in the memory first and 2) that I'm missing a step in the conversion process. My values range from 0-8, therefore I don't expect that the simple conversion tool in labview should make everything into zeroes.
    Any help?

    Since we are using the cRIO's FPGA interface, you really should be doing most of this inside of the FPGA.  Use DMA FIFOs to pass your data between your RT and the FPGA (and visa versa).
    On your FPGA, you can have a loop that just reads the analog inputs at whatever loop rate you want.  You just send the data to the RT using a DMA.
    Similarly, use a DMA to send your analog output values to the FPGA.  The FPGA can have another loop that reads the DMA and writes the value to the analog output.  This should be done in the FPGA since you can have the FPGA send out the values at a given (and deterministic) loop rate.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

Maybe you are looking for