Using Timestamp - newbie

Hi,
I've got a question on how to use TimeStamp?...which timestamp class/method to use?..etc,etc...
I'm using JDeveloper with Oracle 8i and it's a distributed database environment.
I've got a single UI for order entry and Ineedto capture the timestamp from the UI and put it into the tables using JDBC - is there such a sample available somewhere or can anyone help me, please?....this is for an assignment and it's due wednesday (9th Oct)- australian time...& this is the only part of it that I havent been able to figure out yet thanks!!...appreciate any help..

Hi,
thanks very much for that - I did go thru the forums and there was stuff on timestamp but not on what I needed to do - I managed to get it going using oracle's 'to_date' function so it's ok now....took me all afternoon but I finally got it happening (only in my li'l trial date table that I made for it - but hey at least it works) .. now to integrate into the actual assignment!!....thanks heaps, ciao,

Similar Messages

  • Problem in following the webblog "Using TimeStamps: BSP Extensions"

    I try to follow the webblog "Using TimeStamps: BSP Extensions for a TimeStamp UI."
    However, after I have created the method 'RESOLVE_MODEL_BINDING' and compiled it, it shows me an error message
    <b>'Method "ADD_TO_CHECK_TABLE" is unknown or PROTECTED or PRIVATE.'</b>
    This is some part of that code.
      model = m_page_context->get_model( model_name ).
      name = model->get_attribute_name( attribute_path = value_path ).
      valuelow = model->get_attribute( attribute_path = value_path ).
      IF id IS INITIAL.
        id = name.
      ENDIF.
      IF disabled IS INITIAL.
        bspmodel ?= model.
        bspmodel->add_to_check_table( control_id = name ).
      ENDIF.

    I defined the bspmodel above the if block like the tutorial code.
    DATA: model             TYPE REF TO if_bsp_model_binding,
          model_name        TYPE string,
          metadata          TYPE REF TO if_bsp_metadata_simple,
          metadata_base     TYPE REF TO if_bsp_metadata,
          value_path        TYPE string,
          is_valid          TYPE i,
          error_value       TYPE string,
          bspmodel          TYPE REF TO if_bsp_model.
    I further looked into the interface <b>if_bsp_model</b> in my system. It doesn't include any interface, and only five methods were found:
    1) INIT
    2) GET_BINDING_INTERFACE
    3) GET_ERRORS
    4) INSTANTIATE
    5) RESET_ERRORS

  • Using Timestamp Object with day light saving time

    Hi,
    I am getting problem while using timestamp object with daylight saving time.
    I am in 'Europe/London' time zone.
    The summer time for this year starts on 30 March(last sunday) at 0200 hours.
    For hour 30/03/2003 01:00, I created a date object using SimpleDateFormat and then created the timestamp object using the longvalue got from dateObject.getTime();
    On printing the timestampObject.toString() it displays
    30/03/2003 00:00 BST.
    It seems that timestamp object uses the system timezone and I want it to be in GMT.
    Could you please tell me how can I get GMT time from timestamp object.
    When creating timestamp object from date

    To translate Date/Timestamp objects in a controlled way use DateFormat objects. When you create a DataFormat object you can specify a Locale object which stipulates timezone information.

  • Playback skips in archive using timestamp

    We are using a the flash player to play back archives from live streams. We are using timestamps so that questions during the stream can match the stream playback.
    The streams are saved in full with no problems but in playback in the Flash player we are experiencing skips at the exact same points.
    Example:
    One archived stream of 30 questions experiences 2 parts where it freezes and skips. I read here that it might have to do with "silent" parts not being saved with teh timestamps.
    http://code.google.com/p/red5/issues/detail?id=15
    Has anyone experienced similar issues?

    3 months have gone by, and you still haven't gotten a response... Adobe Software is no better than a toothpick made in China. They want your money, that's it!

  • How to get  generic delta using timestamp field

    Hi All,
    i have created a generic datasource using tables vbrp,vbrk.mara,marc,knvv.. to get the sales data for planning.Here i have document created date and time.So i'm concatinating these 2 date and time fields into timestamp which is of format yyyymmddhhmmss.Finally i'm using this timestamp to extract data .
    So is it the right way to pull the data using timestamp and what is the timezone i need to specify as the servers are in india only.
    or any other way to proceed.
    Thanks
    Rao.

    Hi Rao,
    Delta based on timestamp based on generic datasource only works if any one of the tables contains timestamp field(not time and date fields separately).
    I dont think by combining date & time fields will give you correct results.
    Regarding time zone: Use SAP system time zone.
    Srini

  • How to use timestamp column in a xmltable function?

    i have a relational view over a xml table and in the view definition i use a virtual XMLTable. my problem is the timestamp value in the xml is in the format like '2001-12-17T17:30:47Z". therefore the view is running into problems. how do i do to_date() kind of function in a XMLTable definition? Thanks.
    XMLTable(
    COLUMNS name VARCHAR2(6) PATH '@ename',
    id NUMBER PATH '@empno'
    time TIMESTAMP PATH '/order/timestamp'

    Export with timestamp check?

  • Using Timestamp [TS] in the output file name

    Hello Everyone,
    i am trying to get the timestamp into the output file generated by the store file atom. Since my Outbound channel is void i thought i could use:
    [TS]
    or
    [yyyy][mm][dd][hour][min][sec]
    My File Specification is: C:\Temp\Out\blabla[TS].xml and unfortunatelythe outputfile are named: blabla[TS].xml
    What am I doing wrong? Can i not use those placeholders in an atom?
    Help is greatly appreciated
    Best regards
    Simon

    Hi Simon,
    Now I see, you're trying to maintain the timestamp in the SLD FILO section and not in a store file atom of an integration scenario.
    In this case, please check the following help document:
    filePattern
    To define the outbound file pattern, define the directory and the file specification. Enter the full path. The integration framework supports Microsoft Windows UNC (Universal Naming Convention) names. The directory you enter must exist in the file system. The user for directory access must have the necessary rights in the file system.
    You can use the following special characters and variables:
    Character/
    Variable
    Description
    To introduce  numbering in the file directory use ?.
    If you enter  for example data????.xml, the integration framework creates an outbound file called data0000.xml, if the directory is empty. If a file, following this naming  convention, already exists in the outbound directory, the next generated file  name is data<last  number>+1.xml. If data0000.xml already exists in the directory, the next file in the directory  is data0001.xml.
    [vbiu]
    This is a placeholder for a value you can  define in scenario package processing. If you use the value, add the b1im_filename attribute directly in the outbound payload.
    <xsl:template  name="transform">
          <xsl:attribute  name="b1im_filename">myName</xsl:attribute>
    </xsl:template>  
    [TS]
    To add a  timestamp to the file name, use the variable. This gives you another  possibility to define unique file names.
    [yyyy]
    Adds the  current year in four digits to the file name
    [yy]
    Adds the  current year in two digits to the file name
    [mm]
    Adds the  current month to the file name
    [dd]
    Adds the  current day to the file name
    [hour]
    Adds the  current hour to the file name
    [min]
    Adds the  current minute to the file name
    [sec]
    Adds the  current second to the file name
    You can also combine the variables. For example file[TS]??.[hour][min].txt
    Here is a screenshot of my SLD FILO definition and from the result:
    Best regards
    Bastian
    P.S.: just in case you need to define a filename in the integration step for the store file atom, here is a screenshot:

  • Dealy in query when i use timestamp

    Hello all
    I have a query like
    " select * from table where create_date > (select max(update) from tableb) )
    The above query is taking a long long time.
    Createdate and update are timestamps
    So i have tried the below query
    " select * from table where create_date > SYSDATE"
    this is pret quick. So i figured out that the inner query is causing the problem. So i have rewritten it using a join like
    select * from (
    (select col1, col2, createdate from table) a, (select max(update) from tableb) b
    where a.createdate>b.update).
    Even this is taking a long time.
    Can somebod please help me how i can tune this query....

    Read this post:
    When your query takes too long ...

  • Problem in using Timestamp from java.sql.*

    AOA
    i have declared a variable
    private Timestamp entryDate = new Timestamp(8);while using it in my application. it inserts similar time stamp in database , like
    01/01/1970 5:00:00 AM
    How to get current time from it and how to insert it in databse.

    AOA
    i have declared a variable
    private Timestamp entryDate = new Timestamp(8);
    Why? What does that 8 mean to you? Did you read the docs to see what it means to Timestamp?
    >
    while using it in my application. it inserts similar
    time stamp in database , like
    01/01/1970 5:00:00 AM
    How to get current time from it and how to insert it
    in databse.Did you read the docs for Timestamp? There's a constructor and/or a set method that takes a Date or a number of millis. You can get the current time in millis with System.currentTimeMillis. (I think that's the method name. Look at System's docs.)
    As far as inserting it, you'll do something like this: TimeStamp ts = ...;
    Connection con = DriverManager.getConection(...);
    PreparedStatement ps = con.prepareStatement("insert into foo (bar) values (?)");
    ps.setTimestamp(1, ts);
    ps.executeUpdate(); Google for jdbc tutorial for more details.

  • How to use timestamp based dynamic message selector?

    Is it possible with message selector to issue query like statement that
    weill fetch any messages that have header timestamp older than "now" + 3 hrs.
    In SQL you would say something like:
    where timestamp <= sysdate + (180/1440)
    Please let ne know.
    Thank you,
    Edmon

    hi edmon,
    to my knowledge dynamically evalutaed expressions like this are not supported by any of the JMS vendors. messageselectors are in SQL92 format and the only dynamic part in them is the contents of the message properties and headers.
    So, you're out of luck with what you want to do (e.g., remove expired messages from a destination when they havent' been consumed within a time threshold??) but i could see two possible solutions:
    1) You could use time-to-live (TTL) on the sender side. Messages that are on the destination beyond their TTL would be placed onto a dead message queue (DMQ) from where you could consume them for further processing. DMQ is not a standard-JMS feature but supported by a few vendorrs (e.g., JBoss, ArjunaMS).
    2) You could use Message-driven Services (MDS) for more elaborate server-side message processing. MDS has been pioneered by ArjunaMS but is also available with a few other JMS vendors.
    Hope that helps!
    Kind regards,
    Thomas.

  • Crash using Timestamps

    Hi,
    I have (at last!) a simple program that accesses a simple DB. I have one table that contains a column of type TIMESTAMP.
    I want to use this timestamp eventually to select a range of data (perhaps using between or something like that). But to test my program I have first just a simple query to select the timestamp field:
    Stmt->setSQL("SELECT dzupd FROM erec_t");
    Works fine. However I now want to select data with a particular timestamp. So I am trying:
    Timestamp tsStart;
    tsStart.fromText ("01/04/06 00:00:00", "DD/MM/YY HH24:MI:SS", "" , env);
    Now, without doing anything else with the timestamp, the program runs as before, outputs all the data, and then crashes. The information I have seems to indicate a problem with the oraclient10.dll:
    AppName: oracle2.exe     AppVer: 0.0.0.0     ModName: oraclient10.dll
    ModVer: 10.2.0.1     Offset: 000ad0f7
    I am using Oracle 10g on Windows XP.
    Any advice would be much appreciated.
    Many thanks.

    Thanks for the tip.
    I will need to study the link properly, but creating the environment is first thing I do and terminating it is the last.
    The code is very simple and looks like this:
    // Oracle2.cpp : Defines the entry point for the console application.
    #include "stdafx.h"
    using namespace oracle::occi;
    using namespace std;
    int tmain(int argc, TCHAR* argv[])
    //create environment and connection
    Environment* env = Environment::createEnvironment();
    cout << "Environment created" << endl;
    Connection* conn=env->createConnection("tester","tdb","testdb");
    //3rd parameter is db name/TNS alias
    cout << "Connection made" << endl;
    // build SELECT statement
    Statement* Stmt = conn->createStatement();
    Stmt->setSQL("SELECT dzupd FROM erec_t");
    Timestamp tsStart;
    tsStart.fromText("01/04/06 00:00:00", "DD/MM/YY HH24:MI:SS", "" , env);
    ResultSet *rs = Stmt->executeQuery();
    while (rs->next())
         Timestamp st = rs->getTimestamp(1);
         cout << "\t\t" << st.toText("dd/mm/yyyy hh:mi:ss",1) << endl;
    Stmt->closeResultSet(rs);//to free resources
    conn->terminateStatement(Stmt);
    //logoff and terminate connection
    env->terminateConnection(conn);
    cout << "Connection terminated" << endl;
    //terminate Environment by calling static method
    // Environment::terminateEnvironment(env);
    cout << "Environment terminated" << endl;
         return 0;
    I think it is all done within the correct scope but I will study it more closely.
    Thanks for the tip.
    Tristan

  • DRAG & DROP IN SQL CALENDAR USING TIMESTAMP COLUMN

    Hi there,
    I'm having a difficulty with the drag & drop process in my sql calendar. The defalult code has been mentioned before as:
    declare
    l_date_value varchar2(32767) := apex_application.g_x01;
    l_primary_key_value varchar2(32767) := apex_application.g_x02;
    begin
    update EMP set HIREDATE = to_date(l_date_value,'YYYYMMDD HH24MISS')
    where ROWID = l_primary_key_value;
    end;
    My sql calendar query though, has not a simple date column, but a TIMESTAMP column used in the Date value attribute.The APPOINTMENTID is my primary key column of APPOINTMENTS table as you can see and of course the APP_TIMESTAMP column as my Date Column (which in my database schema is created by the "merging" of my APP_DATE & APP_TIME columns ):
    SELECT APPOINTMENTID,DECODE(APP_STATUS,'0','#005C09','1','#EF5800','2','#000099','3','purple')COLOR,
    (TO_CHAR(APP_TIMESTAMP,'HH24:MI')||' / '||(SELECT LAST_NAME||' '||FIRST_NAME
    FROM PATIENTS C
    WHERE C.PAT_ID = A.PAT_ID)||' / '||UPPER(APP_DESCR)||' / '||APP_TEL_NO) APP_ROW,
    APP_TIMESTAMP
    FROM APPOINTMENTS A, PATIENTS C
    WHERE C.PAT_ID(+) = A.PAT_ID
    So far, in my on demand process i have written the code shown below and the result is just the dragging functionality:
    declare
    l_date_value varchar2(32767) := apex_application.g_x01;
    l_primary_key_value varchar2(32767) := apex_application.g_x02;
    begin
    update APPOINTMENTS
    set APP_TIMESTAMP = to_date(l_date_value,'DD/MM/RRRR HH24MI')
    where APPOINTMENTID = l_primary_key_value;
    end;
    Any suggestion is welcome,
    Thanks

    Hi,
    I just found a solution. I implemented for each column an own event-handler. Therefore I can assign the excercise to the right column.
    Has anybody else a better solution?
    Best regards
    Max

  • Using timestamp in union all view

    I am having a silly problem with one of my views. It is a union all with two select statements. There is a timestamp(6) in one select but not in the other so I have a to_timestamp(null) to match up the columns.
    The problem is that no matter how I code the to_timestamp(null,fmt) the structure of the view is always timestamp(0). I even changed the 2nd select so that it uses a timestamp(6) column. If I create 2 views from both selects they have the correct syntax but as soon as I use a union the timestamp loses it precision.
    When I acutally do a select from the view I can still see the milliseconds precision. My real problem occurs in that I have a ref cursor that is of type view_row%rowtype. When I select into the cursor I lose the precision.
    Any ideas?
    thx

    Use the cast function to cast the timestamp to timestamp(6)
    SQL> create table t
    2 ( id number
    3 , ts timestamp(6)
    4 );
    Table created.
    SQL> create view v
    2 as
    3 select id, ts
    4 from t
    5 union all
    6 select 0, cast(to_timestamp(null) as timestamp(6))
    7 from dual;
    View created.
    SQL> desc v
    Name Null? Type
    ID NUMBER
    TS TIMESTAMP(6)
    SQL> insert into t
    2 values (1,systimestamp);
    1 row created.
    SQL> select * from v;
    ID
    TS
    1
    31-AUG-04 02.28.38.342412 PM
    0

  • Urgent , not display the time using Timestamp

    Hello I need to know if the configuration of sunone 7 I can prevent that it sees the hours in a consultation Oracle.
    I am making a Select on a field type DATES, that you have date and hour.
    Use the TimesTamp class from java. It is not the Oracle nor the version of JDK.
    It is urgent!

    That is odd and I could only guess at the cause.
    If the file came from a digital camera the "code" for the timeline may be corrupt. This could happen if the capture was started and then stopped then resumed.
    I would also expect playback of the file to stop when QT Player reaches what "it thinks" is the end of the file. Hitting the play button may continue playback or it could return to the "beginning" of the file.
    You may be able to see the timeline by opening the "Movie Info" window. Leave it open as you play the file. Does the time appear in the Movie Info window?

  • Can IdM use TimeStamp files in its Active Sync for Database table ?

    I have an IdM 7.1 implementation that I inherited
    and have a Database Table resource adapter with Active Sync.
    Here's a few ways to set up Active Sync, but I want to explore the latter.
    -Static Search Predicate (clause)
    You can use a flag (column) in your data table. Does not require any mapping, and presumably whatever process you're kicking off would turn off the flag, so the record is not picked up subsequently.
    -Last Fetched Predicate (documented in the Resource Reference, under Database Table),
    Normally, you'd be doing a comparison based on timestamps, and the mapping between a timestamp-User Extended Attribute AND timestamp-Database Column
    In this implementation, I do not see a User Extended Attribute (UXA) but I do see a 0 byte timestamp file on the server. Did not see anything like this discussed in the docs, but my hypothesis is that this is being used, or has been configured somehow. I wonder if I am right ?
    Let's call it 'MyTS'
    I see MyTS both in ActiveSync logs, as well as in the 'XML Data' object, resource_SYNC, that A/S creates. Maybe this is a hidden feature, or mostly undocumented, or from an earlier version. Anyone care to offer a suggestion or explanation ? Your thoughts would be welcome.
    thanks

    'MyTS' would be a resource attribute. Have a look in the schema map for your resource.
    It doesn't need to be, and would not normally be, a user extended attribute.

Maybe you are looking for

  • I need help setting up a network

    I am not sure how to go about doing this or if it even possible. I would like to setup a network where 4 or 5 computers will have access to each others shared folders and be able to used the printer on the main computer. I have one desktop that will

  • IE issue with CF inputs

    I have a very simpleCF input:                     <label for="login_id">Account ID:</label>                     <cfinput type="password" size="25" name="login_id" /> My issue is, whenever I change the TYPE to TEXT, so the user can see what they are t

  • IPod touch 4 has gotten stuck while updating/restoring.

    Today I got a message that there was a new iTunes, so I updated it. Then I got a message that there was a new update for my iPod Touch 4th Gen.  So I updated it.   ...or tried to.   During the "restore" phase the process stops at about 25% (as seen o

  • How do I control a printer to print on pass

    My customer wants to print a label every time a unit passes the test.  He wants me to provide a control signal from my LabVIEW application that will start the printer.  How do I do that?  I'm using compact DAQ and DAQmx. Thanks in advance.

  • Flash for 2.2

    Does anyone know what is going on with Flash support for 2.2?  When I try to download it on my MOTO Droid thru the Market it says it can't be found....