How to read date and time with Oracle_Loader (10g)

ip pc username date time
1.1.1.1 WS1 test 2000/01/01 01:01:01
I am trying to read the date and time from data formatted as above from a .txt file.
create TABLE test (IP char(20), OCID char(15), ID char(30), date_logon date, time_logon date)
ORGANIZATION EXTERNAL (TYPE ORACLE_loader DEFAULT DIRECTORY phonebook
ACCESS PARAMETERS (FIELDS TERMINATED BY WHITESPACE
(IP char(20),
OCID char(15),
ID char(30),
date_logon char(30) DATE_FORMAT DATE MASK "yyyy/mm/dd",
time_logon char(30) date_FORMAT date MASK "hh24:mi:ss"))
LOCATION ('test.log'));
However, my external table returns a date (2007-05-01) AND the time for the time_logon column (e.g. 2007-05-01 01:01:01) . I just want the time (e.g. 01:01:01).
What am I doing wrong?
*I tried: date_logon char(30) DATE_FORMAT DATE MASK "yyyy/mm/dd hh24:mi:ss", reading both the date and time at the same time, but it doesn't work.
Thanks.

Justin, thank you so much for your help.
When I try:
SELECT a.ip, a.ocid, a.id, TO_CHAR( a.date_logon, 'DD-MON-YYYY HH24:MI:SS' )
FROM test a
date_logon entries are all dd-mon-yyyy and 00:00:00 (i.e. no time was stored).
I don't have control over the text file, so I don't think I can make any changes to the formatting.
I tried to declare the column as 'timestamp':
date_logon char(60) DATE_FORMAT timestamp MASK "yyyy/mm/dd hh24:mi:ss",
but time is still displayed as 00:00:00:000.... which leads me to suspect that the culprit is the space between date and time in the text file.
Say if I have 2007/05/25 and 2007/05/01 16:19:23 in two separate date columns. Is it possible to grab the time from the second column and append it to the first column (while still retaining the DATE property, i.e. 2007/05/25 16:19:23).
Thanks!

Similar Messages

  • How to show Date and Time with TimeZone

    Dear All,
    I have to show Date and Time with TimeZone abbreviation,
    for example:
    1) 31 March 2011 2:30 in india standard time - it should show in screen 31 March 2011 2:30 IST.
    2) 31 March 2011 2:30 in Australia/New Zealand - Eastern time zone it should show in screen 31 March 2011 2:30 AEST.
    how can i show *Australia/New Zealand - Eastern time zone to AEST*,
    I tried with format DD MMM YYYY HH:MM zzz, and i looked time zone API too.
    Appreciate your help
    Thanks
    Daya

    Dayananda wrote:
    ok, than i have to use zzzz format, as z won't help in my case, so i have to use zzzz which display descriptive value like, Indian Standard Time i.e. ISTPer the javadocs there is a very specific reason why that is a problem especially if you intend to support many timezones in one application.
    "+For compatibility with JDK 1.1.x, some other three-letter time zone IDs (such as "PST", "CTT", "AST") are also supported. However, their use is deprecated because the same abbreviation is often used for multiple time zones (for example, "CST" could be U.S. "Central Standard Time" and "China Standard Time"), and the Java platform can then only recognize one of them+."
    Thus you have one single case where there can be many and moreover it can change (twice a year I believe.)
    There is a standard source for this information although when I tried it it appears to not work.
    If the app only needs to display one zone then provide a configuration value that allows a user to overload the display value.
    If the app needs to display many values then you MUST inform business users of the problem because there are duplicates and they, not you, need to decide specifically what happens in those cases.

  • How do you date and time stamp iCal entries?  We share an event calendar and need to know when a new event was entered into iCal.

    How do you date and time stamp iCal entries?  We share an event calendar and need to know when a new event was entered into iCal.

    BKBK,
    Thank you for your response. That does adequately cover the
    client-originated sessions, but still leaves the ability I am
    looking for unavailable.
    It did serve to definitively answer my most pressing
    question, however, with this statement:
    Note: ColdFusion cannot create a session if an initiator
    application uses a SendGatewayMessage method to start an
    interaction with a client, such as an SMS user. In this case, the
    sending code must keep track (for example, in a database) of the
    messages it sends and their destinations. When a response event
    arrives, it can look up the origniatorID to determine whether it
    was in response to an outgoing message.
    I will play around with the Application scope to see if there
    might be a workable solution there.
    RLS

  • How to compare date and time together

    Hi,
    How to compare Date and Time together?
    For example in a database table there are two fields rundate and runtime.  I want to compare these two with perticular date and time in the program.  Like, I want to pull all the records where the records's date and time are less than a perticular date and time in the program.
    Hope the question is clear...
    Thanks.
    Kavita

    Hi Kavita
    There is no as such Date and Time Comparision FM in Standard SAP  But You can define your own like this
    <b>FUNCTION ZAV4_COMPAREDATETIME.
    ""Lokale Schnittstelle:
    *"  IMPORTING
    *"     REFERENCE(DATE1) TYPE  DATS
    *"     REFERENCE(TIME1) TYPE  TIMS
    *"     REFERENCE(DATE2) TYPE  DATS
    *"     REFERENCE(TIME2) TYPE  TIMS
    *"  EXPORTING
    *"     VALUE(TWOISMORETOPICAL) TYPE  C
      twoismoretopical = ''.
      if date2 > date1.
        twoismoretopical = 'X'.
      else.
         if date2 = date1 and time2 > time1.
           twoismoretopical = 'X'.
         endif.
      endif.
    ENDFUNCTION.</b>
    Regards
    Mithlesh

  • How to display date and time on jsf page

    Hi,
    how to display date and time on jsf page
    we are using 11.2.0.0 jdeveloper on windows.
    thanks
    Edited by: user12187801 on 26-Jul-2012 01:42

    Your question is certainly lacking some information.
    If you want a constantly updating date/time - then JavaScript is your best bet, and Google would find you examples like [url http://www.webestools.com/scripts_tutorials-code-source-7-display-date-and-time-in-javascript-real-time-clock-javascript-date-time.html]this
    If you meant something else, then it's back to you to explain.

  • How to set date and time on apple tv

    how to set date and time on apple tv

    Assuming this is not the first time you have used your Apple TV
        1.    You might try restarting the Apple TV by removing ALL the cables for 30 seconds.
        2.    Also try restarting the router.
        3.    If the problem persists, try a restore, you may want to try the previous procedures several times before doing this.
    If this is a new Apple TV, it may also be that your network router is not allowing access to the timeserver, check that your router allows access over port 123.

  • How to find date and time on photo taken by iphone?, How to find date and time on photo taken by iphone?

    How to find date and time on iphone's photo taken?

    in iPhoto no matter the source of the photo you see the information about th ephoto by selecting the photo and showing info (the get info button may be in a different location depending on the version of iPhoto you have)
    If you are not aking an iPhoto question but are asking an iPhone question instead then repost in the iPhone forum - iPhoto has no association with the iPhone
    LN

  • How to pass system date and time with tabular from in Update only Mode.

    Dear Friends,
    i have created tabular form with UPDATE Only .here i am assigning work to another multiple users.i want to insert system date and time when i assign work to multiple users.
    How can i insert system date and time into table using tabular form in Update Only Mode.
    beacuse i have pass in default system date it's working only with add row button.
    How can i pass system date and time in update mode in tabular form.
    Thanks

    Hi,
    You just create a trigger on the table on which you build your tabular form:
    e.g:
    CREATE OR REPLACE TRIGGER  "AUDITING"
    before insert or update on "MYTABLE"
    for each row
    begin
        if inserting then
            :new.created_on := localtimestamp;
            :new.created_by := nvl(v('APP_USER'),user);
        elsif updating then
            :new.updated_on := localtimestamp;
            :new.updated_by := nvl(v('APP_USER'),user);
        end if;
    end;Regards,
    Fateh

  • How to provide date and time stamp to the extracted file.

    I 'm downloading data from DB to Flat file using GUI_DOWLOAD. whenever it is executed it is creating with a file name.
    if i rerun the program the file is overwriting with the same name.
    now based on the requirement how many times i executed, that many times file should be individually created and should be added with date and time stamp.
    like
    if when i executed  at the very first time it should saved with filename, date and time.
    say "Address.txt 04/05/2007 07:55:10"
    When i executed it for second time it doesn't overwrite the file.
    it should create a new file.
    like "Address.txt 04/05/2007 07:59:20".
    Please guide me the way if possible code.
    Thanks in advance.

    Hi Vamsi,
                   Use FM 'F4_PROGRAM' to take file from the user .
    In this case user will enter the file name. u can append date & time to that file path.
    Refer this code.
    CALL FUNCTION 'F4_FILENAME'
        EXPORTING
          PROGRAM_NAME  = SY-REPID
          DYNPRO_NUMBER = SYST-DYNNR
        IMPORTING
          FILE_NAME     = P_P_FILE.
    concatenate P_FILE '04/05/2007 07:59:20' into V_FILE.
    CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          filename                        = v_file
         filetype                        = 'ASC'
          write_field_separator           = 'X'
        TABLES
          data_tab                        = i_tab
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      IF sy-subrc = 0.
        MESSAGE i002.
      ENDIF.
    Reward points if helpful.
    Regards,
    Hemant.

  • Envy 5660 - how to change date and time

    During installation I thought I had selected the correct date and time.  That didn't happen.  After installation is completed how can I make these changes?
    This question was solved.
    View Solution.

    Hey @Americanpioneer,
    Welcome to the HP Support Forums!
    I understand that you would like assistance setting the date and time on your HP ENVY 5660 e-All-in-One Printer. I would like to assist you today with properly configuring these two settings.  Please follow the steps below to configure your date and time.
    With the printer powered on, use your finger to scroll to the left on the touchscreen (like a cellphone) and you will see Setup
    Touch Setup to access the Setup menu
    Next, touch Preferences
    Under Preferences you will now see Date & Time
    Touch Date to change the date on your printer
    Touch Time to change the time on your printer
    Please let me know if these steps resolve your issue. Good luck!
    X-23
    I work on behalf of HP
    Please click "Accept as Solution" if you feel my post solved your issue, it will help others find the solution.
    Click the "Kudos, Thumbs Up" on the right to say "Thanks" for helping!

  • How to change date and time format

    Hi experts,
    Can i know how to change the date and time format?
    I want the date format to be dd-mmm-yyyy  and time format to be hh:mm:ss
    These date and time is in my sapscript form.
    I make use of PERFORM function in sapscript.
    This is the code in my print program.
    FORM get_actlog_QA TABLES in_tab STRUCTURE itcsy
                           out_tab STRUCTURE itcsy.
       DATA: object TYPE string, "
            qaname LIKE JCDS-USNAM, "NAME for engineering process, QA Manager
            qadate LIKE JCDS-UDATE, "DATE changed in engineering process, QA Manager
            qatime LIKE JCDS-UTIME. "TIME changed in engineering process, QA Manager
    DATA: lt_jcds type standard table of jcds,
          wa_jcds like line of lt_jcds,
          new_date(10) type c.
      READ TABLE in_tab INDEX 1.
      MOVE in_tab-value TO object.
      select * into CORRESPONDING FIELDS OF TABLE lt_jcds
      from jcds WHERE objnr = object
        AND  ( stat = 'E0005' )
        AND inact = ''.
      Loop at lt_jcds into wa_jcds.
          qaname = wa_jcds-USNAM.
          qadate = wa_jcds-UDATE.
          qatime = wa_jcds-UTIME.
       READ TABLE out_tab INDEX 1.
       MOVE qaname TO out_tab-value.
       MODIFY out_tab INDEX sy-tabix.
       READ TABLE out_tab INDEX 2.
       MOVE qadate TO out_tab-value.
       MODIFY out_tab INDEX sy-tabix.
       READ TABLE out_tab INDEX 3.
       MOVE qatime TO out_tab-value.
       MODIFY out_tab INDEX sy-tabix.
      endloop.
      clear wa_jcds.
      ENDFORM. 
    This is my PERFORM in sapscript.
    /:           DEFINE &V_QANAME& = ''.
    /:           DEFINE &V_QADATE& = ''.
    /:           DEFINE &V_QATIME& = ''.
    /:           PERFORM GET_ACTLOG_QA IN PROGRAM ZFIR002
    /:           USING &VIQMEL-OBJNR&
    /:           CHANGING &V_QANAME&
    /:           CHANGING &V_QADATE&
    /:           CHANGING &V_QATIME&
    /:           ENDPERFORM.                     
    Sapscript
    Prepared by : &V_QANAME& ,, &V_QADATE& ,, &V_QATIME&
    The output now is
    Prepared by: Name   20080312  115536 
    I want to change the date format to 12-MAR-2008
    and the time format to 11:55:36 
    Can anyone please suggest on how to solve this?
    Thank you.

    Hi,
      Before assigning the  QADATE value you can write the logic to display  20080312   as  12-MAR-2008  taking the offset values .
    Like
    qadate = wa_jcds-UDATE.
    qatime = wa_jcds-UTIME.
      lw_year    = qadate(4).
      lw_month = qadate+4(2).
      lw_date    = qadate+6(2).
    case lw_month.
    when 1.
    when 2.
            concatenate lw_date  '-FEB-'  lw_year into qadate.
    when 3.
          concatenate lw_date '-MAR-' lw_year into qadate.
    endcase.
    READ TABLE out_tab INDEX 2.
    MOVE qadate TO out_tab-value.
    MODIFY out_tab INDEX sy-tabix.
    And you can also change the timeformat also  .
    then assign that value to qatime .Then
    READ TABLE out_tab INDEX 3.
    MOVE qatime TO out_tab-value.
    MODIFY out_tab INDEX sy-tabix.
    I think this helps you.
    Regards,
    Rajitha.

  • Changing Date and Time with dng files

    My camera settings for date and time were wrong.
    So some of my files in Lightroom 3 have the wrong dates.
    This morning I downloaded Photoinfo 2.0.1 but it doesn't seem to want to accept "dng" files to change the info.
    It will accept "jpeg" files no problem.
    Can anyone help me with this.
    Thanks

    Open the Catalog Setting panel (Lightroom menu on Mac and Edit menu on Windows). Configure the Metadata>Exif tab as shown in red on screenshot. Select your images and choose Save Metadata to File (Ctrl/Cmd+S) from Metadata menu (same menu as Edit Capture time. This will save the date/time changes back into the file rather than just the catalog.

  • How to find date and time on pics and video on iphone 4

    how do you find the date and time of photos and video on iphone 4?

    Your question is certainly lacking some information.
    If you want a constantly updating date/time - then JavaScript is your best bet, and Google would find you examples like [url http://www.webestools.com/scripts_tutorials-code-source-7-display-date-and-time-in-javascript-real-time-clock-javascript-date-time.html]this
    If you meant something else, then it's back to you to explain.

  • How to know date and time information from Trace File defaultTrace.X.trc?

    Hi, all.
      i'm using EP 6.0 SP9 patch 1.
      As you know, default trace is written in the <SID>\JC00\j2ee\cluster\server0\log\defaultTrace.X.trc.
      By using the default trace formatter, it shows like the following sample messages.
    #1.5#0011110E7B2000590000000100000A100003EC71562E6EBC#1104396451585#com.sap.jms.server.ServerClientAdapter##com.sap.jms.server.ServerClientAdapter#Guest#18####716257115a3f11d9b73b0011110e7b20#SAPEngine_Application_Thread[impl:3]_23##0#0#Error#1#/Applications/JMS#Plain###JMS internal error at ServerClientAdapter! JMS Service is not started!#
      My questions are
      1. how do we retrieve the date and time information from the above message? It seems that this message has date and time info because LogViewer shows the date and time based on the above message.
      2. how do we change the above date format to easier one
    like "YYYY:MM:DD:hh:mm:ss"? i know that it can be configured from the Visual Admin --> Services --> Log Configurator but i don't know the exact place for the trace file.
      Thanks.

    Hi Sejoon,
    I use the standalone Logviewer to read the log files. Works great.
    "If you have an SAP Web Application Server Java 6.20 or below you may also get a standalone_logviewer.zip file at the SAP Service Marketplace at service.sap.com/download &#8594; SAP NetWeaver &#8594; Release ‘04. In this case JDK version 1.3 or higher must be installed on the system. The java version must be same on the server and the client.
    In the SAP Web AS Java 6.30 installation a folder named logviewer_standalone can be found under: <path Of J2EE installation>/<SysID>/JC<nr>/j2ee/admin/logviewer_standalone. Verify that the batch file logviewer.bat is installed in the directory logviewer-standalone.
    (source -> http://help.sap.com/saphelp_nw04/helpdata/en/e4/540c404a435509e10000000a1550b0/frameset.htm)
    Best wishes,
    Noel

  • How to Change date and time on my printer

    I want to know how to change the date and time on my printer.

    annazmussaqib,
    OK, now enter the following command in the administrative user’s Terminal window:
    sudo date -n 122921502013
    When it asks you for a password, enter your administrative user’s password; it will not show the password as you type it.
    After you enter that command, enter this command again:
    date
    It should show a date and time that is close enough to the actual date and time that you should be able to go into the Date & Time pane of System Preferences without it hanging.

Maybe you are looking for