DATE FORMAT in HANA table

Hi
I have Csv file in UTF-8 format have fields like data
2012/02/23, XXXXXX( all 2byte characters),........................................
When i import it says invalid number for 2012/02/23.
I created table like this
Create column table Schema1.table (
SHOD     DATE,
MANUD     DATE,
and
Create column table Schema1.table (
SHOD     VARCHAR(10),
MANUD     VARCHAR(10),
both does not allow me to store data into table..any idea please.
Regards
Magalingam

Hi,
If you are using the .ctl file to import .CSV files into HANA, the default source date format is YYYYMMDD. However, if say your source format is in the YYYY/MM/DD format for e.g... you can change your IMPORT statement as follows:
IMPORT FROM '<file_location>.ctl' WITH THREADS 16 BATCH 200000 DATE FORMAT 'YYYY/MM/DD';
It is worth noting the SYTAX of the IMPORT statement as you could transform TIME and TIMESTAMP fields similarly:
IMPORT FROM [<file_type>] <file_path> [INTO <table_name>] [WITH <import_from_option
_list>]
<file_type> ::= CSV FILE | CONTROL FILE
<file_path> ::= '<character>...'
<table_name> ::= [<schema_name>.]<identifier>
<import_from_option_list> ::= <import_from_option> | <import_from_option_list> <import_from_option>
<import_from_option> :: =
THREADS <number_of_threads> |
BATCH <number_of_records_of_each_commit> |
TABLE LOCK |
NO TYPE CHECK |
SKIP FIRST <number_of_rows_to_skip> ROW |
COLUMN LIST IN FIRST ROW |
COLUMN LIST ( <column_name_list> ) |
RECORD DELIMITED BY  '<string_for_record_delimiter>' |
FIELD DELIMITED BY  '<string_for_field_delimiter>' |
OPTIONALLY ENCLOSED BY '<character_for_optional_enclosure>' |
DATE FORMAT '<string_for_date_format>' |
TIME FORMAT '<string_for_time_format>' |
TIMESTAMP FORMAT '<string_for_timestamp_format>' |
Thanks,
Anooj

Similar Messages

  • Date format in external table

    Hi All,
    I have a flat file which has date field that looks like '2007-08-09 19:04:03.597000000'. I have to create an external table to read the file. I tried giving these two date formats 'yyyy-mm-dd hh24:mi:ss.ff' and 'yyyy-mm-dd hh24:mi:ss.ms'. But none of them works. what should be the date format to be mentioned in external table defnition?
    The external table defnition is like
    CREATE TABLE EXT_TEST
    (     "ID" NUMBER(10,0),
         "DATE_COL" DATE
    ORGANIZATION EXTERNAL
    ( TYPE ORACLE_LOADER
    DEFAULT DIRECTORY "EXT_TAB_DIR"
    ACCESS PARAMETERS
    ( RECORDS DELIMITED BY NEWLINE
    FIELDS TERMINATED BY '|'
    MISSING FIELD VALUES ARE NULL(
    ID,
    "DATE_COL" DATE "yyyy-mm-dd hh24:mi:ss.ff"
    LOCATION
    ( 'test.dat'
    REJECT LIMIT UNLIMITED;
    Thanks

    Thanks for the help,
    I have one more date column and the format is like 1/31/2007 4:03:56 PM. The external table defnition looks like
    CREATE TABLE EXT_TEST
    ( "ID" NUMBER(10,0),
    "DATE_COL" DATE
    ORGANIZATION EXTERNAL
    ( TYPE ORACLE_LOADER
    DEFAULT DIRECTORY "EXT_TAB_DIR"
    ACCESS PARAMETERS
    ( RECORDS DELIMITED BY NEWLINE
    FIELDS TERMINATED BY '|'
    MISSING FIELD VALUES ARE NULL(
    ID,
    "DATE_COL" char date_format date mask "M/d/yyyy h:mm:ss tt"
    LOCATION
    ( 'test.dat'
    REJECT LIMIT UNLIMITED;
    But this again gives an error. Is this the correct date format?

  • Date Format in WDA table

    Hi Experts,
    I have had an excellent experience of getting expert answers here. I am again facing a small issue -
    I have a form with a tabl ui element which gets populated with some values from the backend.
    One of the field in the table is date. So i have a binding with the table with a node with attributes where one of the fiel in the table is date so is bound with an attribute in that node with date type DATS. Now the requirement of the client is that they want the date field in the table (on the form )  to be displayed in the form of mm/dd/yy and not mm-dd-yy. Right now it is being displayed as
    mm-dd-yy. Is there any way to display the field in the table on the form in the form of mm/dd/yy ???
    Thanks in advance for the help.

    see this thread if this helps you [Date format : DD-MMM-YYYY ???|Date format : DD-MMM-YYYY ???]

  • Problem in Date format display at table leve in 3.1i System

    Hi Team,
    I am facing an issue in 3.1i Prod System.
    When i go and check at SE16 transaction and table name is TCURR. Execute the same i am getting date displayed in an unknown format.
    For Eg:
    Valid From Date
    79908769
    When i double click the same record, it displays the correct date format:
    12/30/2009
    when i download the table contents into excel sheet it should display the correct date format: instead of 79908769 to 12/30/2009.
    But my problem is either to display the proper format of date at the table level.
    Is there anyway to download the contents in correct dated format without disturbing the data elements or domain at table level.
    Please let me know how to solve this problem.
    Thanks,
    Sunil Kumar

    You need to write abap program to download into the required format.
    once you get the date field in your work area...
    say you have date field in wa_data-budat , after that use the above syntax you will get the required format.
    DATA :
         v_date type sy-datum.    
         write wa_data-budat to v_date  MM/DD/YYYY.
    Please let me know if you need further information.
    Regards
    Satish Boguda

  • Data format in the table(THTMLB:CELLERATOR)

    Hi All,
    I want to format the data in the table.
    In my case I want the date field to be displayed in MM/DD/YYYY(currently it is displaying as YYYYMMDD) format. For table display I am using "THTMLB:CELLERATOR".
    I tried using the interface method: IF_HTMLB_TABLEVIEW_ITERATOR~RENDER_CELL_START but it is not triggering at all.
    Thanks in advance.
    -Chandra

    The issue has been resolved. Need to initialize the iterator in the do_init_context.

  • Date format from J_1IEXCTAX table...

    Dear All,
    DATA dt type d.
    dt1 = sy-datum.
           SELECT SINGLE RATE ECSRATE J_1IADDRAT1 FROM J_1IEXCTAX INTO
                  (ITAB-RATE,ITAB-ECSRATE,ITAB-J_1IADDRAT1) WHERE J_1ICHID = ITAB-J_1ICHID AND
                                                                  J_1IEXCIND = ITAB-J_1IEXCICU AND
                                                                  ( VALIDFROM >= dt1 AND VALIDTO <= dt1 ).
    Where as in table J_1IEXCTAX date format is different and i am not getting output. VALIDFROM and VALIDTO fields is in text.
    How to get data ? waiting for reply.
    Yusuf
    Edited by: YUSUF BHORI on Mar 4, 2010 12:40 PM
    Edited by: YUSUF BHORI on Mar 4, 2010 12:41 PM

    There are different Convertions required for different applications.
    You can check this at domain level of field.
    Check this from SAP help.
    Conversion Routine
    Conversion takes place when converting the contents of a screen field from display format to SAP-internal format
    and vice versa and when outputting with the ABAP statement WRITE, depending on the data type of the field.
    If standard conversion is not suitable, it can be overridden by specifying a conversion routine in the underlying domain.
    A conversion routine is identified by its five-place name and is stored as a group of two function modules.
    The function modules have a fixed naming convention. The following function modules are assigned to
    conversion routine xxxxx:
    CONVERSION_EXIT_xxxxx_INPUT
    CONVERSION_EXIT_xxxxx_OUTPUT
    The INPUT module performs the conversion from display format to internal format. The OUTPUT module performs the
    conversion from internal format to display format.
    If a screen field refers to a domain with a conversion routine, this conversion routine is executed automatically each
    time an entry is made in this screen field or when values are displayed with this screen field.

  • Invalid data format on EXPORTING table  to SQL-FLAT FILE (Insert type)

    Hi there!
    Writing from Slovenia/Europe.
    Working with ORACLE9i (standard version) on Windows XP with SQL-deloper 1.0.0.015.
    FIRST SQL.-DEVELOPER IS GOOD TOOL WITH SOME MINOR ERRORS.
    1.) Declare and Insert data EXAMPLE
    drop table tst_date;
    create table tst_date (fld_date date);
    insert into tst_date values (sysdate);
    insert into tst_date values (sysdate);
    2.) Retriving date with SQLPLUS
    SQL> select to_char(fld_date,'DD.MM.YYYY HH24:MI:SS') FROM TST_DATE;
    23.10.2006 11:25:23
    23.10.2006 11:25:25
    As you see TIME DATA IS CORRECT.
    When I EXPOPRT data TO SQL-insert type I got this result IN TST_DATE.SQL file:
    -- INSERTING into TST_DATE
    Insert into "TST_DATE" ("FLD_DATE") values (to_date('2006-10-23','DD.MM.RR'));
    Insert into "TST_DATE" ("FLD_DATE") values (to_date('2006-10-23','DD.MM.RR'));
    As you seel I lost TIME DATA.
    QUESTION!
    HOW CAN I SET PROPER DATE FORMAT IN SQL-DEVELOPER BEFORE I EXPORT DATA TO FLAT FILE.
    Best regards, Iztok from SLOVENIA
    Message was edited by:
    DEKUS

    A DATE-Field, is a DATE-Field and not a
    DATE-TIME-Field.
    The export-tool identifies a DATE-Field and exports
    the data into date-format.This is not true. Oracle DATE fields include a time element.
    To the original poster - I believe this is a bug in the current version.
    See this thread for possible workarounds Bad Export format --- BUG ???
    Message was edited by:
    smitjb

  • How to get the Date format inside the table

    I have a startdate column in the db in the format May 5, 2001 12:39:00 PM, when I query it from a view in this way : SELECT startdate, ... FROM ..., it returns the format in the db,
    However I have to do this SELECT
    decode(startdate, null, 'NOT START'), startdate), ... the result is 5-MAY-01,
    then I tried this to_char(startTime, 'Month DD, YYYY HH:MI: A.M.') the results become May 05, 2001 12:39:00 PM. (more space between month and day, and 05 instaed of 5)
    Does anybody know how to fix this, so I get exactly what is in the db?
    Thanks in advance

    No matter what you do if you are storing a date in a column it will get stored in the Oracle's internal 7 byte date format.
    The way you get it on retreiving it is as set by your date format. You can either change the default date format for the instance, the individual session or the individual SQL statement(in this case using to_char(date, 'format')).
    If you want to store the date in a format you want to store you'll have to store it as char or varchar2.
    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by George ([email protected]):
    I have a startdate column in the db in the format May 5, 2001 12:39:00 PM, when I query it from a view in this way : SELECT startdate, ... FROM ..., it returns the format in the db,
    However I have to do this SELECT
    decode(startdate, null, 'NOT START'), startdate), ... the result is 5-MAY-01,
    then I tried this to_char(startTime, 'Month DD, YYYY HH:MI: A.M.') the results become May 05, 2001 12:39:00 PM. (more space between month and day, and 05 instaed of 5)
    Does anybody know how to fix this, so I get exactly what is in the db?
    Thanks in advance<HR></BLOCKQUOTE>
    When you do to_char() with 'month' oracle blank pads the month to nine characters, the same goes with day too. So to get rid of it you'll have to trim() the month. And if you want to get a single digit for date less than 10 instead of 0x you'll have to do a bit of extra jugglery using translate() or replace().
    Hope this helps
    Naveen

  • Problem with Date Format in a Table.

    Hi, I have several views, in each views I have two tables with two fields of date.
    This data are from an adaptive RFC function exported in Date ABAP format.
    The webdynpro is showing me the date in mm/dd/yyyy format, and I want to change that to dd/mm/yyyy. Which is the easiest way to accomplish this.
    Thx

    Rodrigo,
    Before you start to alter default behavior, take on acount that it was created with certain reason, namely support for internationalization(I18N) and localization (I10N). So WD application displays date, times, currencies in locale-specific manner.
    Altering just date display leads to inconsistences with other formatting.
    The locale is choosen by sevearl criterias, you may search WD forum to find out more. Briefly, WD consider settings in UME for logged-in user, browser headers and application url parameters.
    For example, try to add the following sap-locale parameter with settings for Spanish/Argentina:
    sap-locale=es_AR
    <b>Notice, that unlike other options suggested here, this will affect all formating in your application. Moreover, if back-end is localized as well (R/3 for example) you will get localized data from back-end</b>
    Valery Silaev
    SaM Solutions
    http://www.sam-solutions.net

  • Date format in create table statement

    Hello,
    I would like to know if it possible to CREATE TABLE with formated date;
    create table months
    (id number,
    (month_col to_char( month_col,'MM'));so when I insert
    insert into months values (1,sysdate); And query
    select *from months;
    I would get
    id     months_col
    1           04I know this could easily be done by cerating a view on a table, but I was wondering if this was possible to implement directly into table.
    I browesed through the documentation, but did not find any datatype that would support this.
    Thank you for replies.

    Personally I would go for using the DATE data type. Using the DATE data type will always ensure that you are actually inserting a date. With a VARCHAR2 or CHAR data type you could insert '27' which is a valid character string but an invalid date.
    To display the data the way you want you could either use a view or if you are on a more recent version of Oracle a virtual column.
    Hope this helps!

  • Duplicate data coming in HANA table

    Hi ,
    we are getting duplicate data old and new records coming to HANA. Table have both old and new in filed created on in table. is it required to re triggred the particular table load. please any help on this.

    Hello Rama,
    there is a separate forum for HANA-related questions: the SAP HANA Development Center.
    Could you please ask this question there (as that seems to be a more relevant space for HANA issues)?
    Regards,
    Laszlo

  • Data format in pivot table calculated item

    Hi All,
    I've got a pivot table with a dimension on rows and a dimension on columns and a measure. I have a "new calculated item" based on the dimension on the columns which does the following: ( ($2-$1) / ($1) ) *100
    I want this calculated item shown as a percentage like 1,2% but the measure must stay a whole number like 1234 (no decimal places or percentage symbols) any suggestions on how to achieve this?
    Thanks in advance!
    Gilles

    Hi Kishore,
    It is not helpful, I mean, it doesn't solve my problem. But nice post!
    What I have is the following:
    --------C1------C2-----C3
    R1|--123--|--345--|--678--|
    R2|--124--|--346--|--679--|
    R3|--125--|--347--|--670--|
    What I want is the following:
    --------C1------C2-----C3---------calculated item
    R1|--123--|--345--|--678--|--(($2-$1) / ($1) ) *100)
    R2|--124--|--346--|--679--|
    R3|--125--|--347--|--670--|
    the column results must remain in the same format, but the calculated item must be in the format %9.99 (to see the percentage change)
    any other suggestions?

  • Date format in HANA Stored procedure

    Hi Experts,
    I would like to change the format from 'YYYY-MM-DD HH24:MI:SS.FF7' to 'DD.MM.YYYY' format. ( Because my target will accept only this format )
    How to do the same? do we have any standard functions which it converts to mentioned format.
    Like in ABAP, CONVERSION_EXIT_IDATE_INPUT/OUTPUT.
    I tried with Splitting the date and concatenating into required format. But, just want know if we have any standard function.

    Hi Michal,
    Thanks for your reply.
    I am trying with the below query
    declare is_valid varchar (12);
    SELECT TO_CHAR(TO_DATE(valid_until), 'DD.MM.YYYY')
       INTO   IS_VALID
       FROM  USERS
       WHERE "USER_NAME" =  'test';
    while using is_valid in the insert query i got an error.
    Error while parsing IS_VALID as TIMESTAMP
    what is the data type for IS_VALID should be?

  • Table date format - How can I display Week 1, Week 2, instead of the date?

    I would like to creat a table for my Gantt, that displays the week number unit, as I have as the middle tier in my timescale on the Gantt side of the view.  I cannot find how to do this anywhere.  I know I can change the way the date is displayed,
    format wise, while in the table edit area, however one of the choices is NOT the week #.  The data must exsist as the timescale displays it! 
    My goal is to creat a table that instead of showing the start date for a task, displaces the start week: i.e. Week 1, Week 2, ...ect.
    Any help is appreciated,
    Craig.

    Craig --
    Bad news, my friend.  What you want to do with the date format in the table cannot be done.  The format you see in the Timescale bar is simply not an available date option in any table.  Sorry.
    Dale A. Howard [MVP]
    VP of Educational Services
    msProjectExperts
    http://www.msprojectexperts.com
    http://www.projectserverexperts.com
    "We write the books on Project Server"

  • Af:table filter date format : task-flow navigation issue

    hi
    When trying to use the date format configured on the Entity Object, with Format Type as Simple Date and Format as "dd-MM-yyyy", there seems to be a problem when using task-flows.
    The approach involves an explicitly configured attributeValues binding to use in f:validator and af:convertDateTime components in the af:inputDate in the filter facet, as discussed in the forum thread "af:table filter date format"
    at af:table filter date format
    I used JDeveloper 11.1.1.3.0 to create the example application
    in http://www.consideringred.com/files/oracle/2010/TableFilterDateFormatIssueApp-v0.03.zip
    - The page filterEmp.jspx shows expected behaviour, the filter uses the configured date format and there is no problem when navigating to another page and back.
    see the screencast at http://screencast.com/t/CtQ9rsVFH3k
    - The page menuBTFPage.jspx allows for some navigation after using the filter resulting in the filter showing a date in the wrong format, using scenario (sc1)
    -- (sc1-a) : run menuBTFPage.jspx
    -- (sc1-b) : on "menu-btf : menu", click the "do go-filter-emp-btf" link
    -- (sc1-c) : on "filter-emp-btf : filterEmpFragment", filter on HireDate using "10-03-2005"
    -- (sc1-d) : click the "do goReturnSuccess" button
    -- (sc1-e) : back on "menu-btf : menu", click the "do go-filter-emp-btf" link again
    -- (sc1-f) : back on "filter-emp-btf : filterEmpFragment", see the HireDate filter value in the wrong format as "2005-03-10"
    -- (sc1-g) : click the "do goReturnSuccess" button again, which results in an error "The date is not in the correct format."
    see the screencast at http://www.screencast.com/t/ORHauBd3oQ
    questions:
    - (q1) Can the behaviour in scenario (sc1) be reproduced?
    - (q2) Why is the filter value in the wrong date format in step (sc1-f)?
    - (q3) What can be done to have the filter value consistently in the configured date format, so that errors as in step (sc1-g) can be avoided?
    many thanks
    Jan Vervecken

    hi
    First a short summary of relevant aspects of service request 3-2190488381:
    - development has reviewed bug 10193260
    - development identified some code where a pattern was not applied and started fixing the problem
    - out of the blue, development asked "Will clearing out the filter field completely when moving out of ataskflow be an acceptable behavior ?"
    - I pointed out some concerns (even in a phone call with development), but development did not see any alternative not "perceived to be very risky because of the current design", so the question whether the clearing-all-filter-fields approach would be acceptable became superfluous.
    - following this, bug 10193260 suddenly became an enhancement request (for reasons I still don't understand)
    - a workaround was suggested (for behaviour not perceived as a bug), "Clearing the search fields during taskflow exit in the backing bean (in the app)." for which I also received a modified version of my example application TableFilterDateFormatIssueApp-v0.04.zip with an implementation of the suggested workaround
    As an exercise to try an understand the suggested workaround (an because my example application seemed to have been modified using the currently yet-to-be-released JDeveloper 11.1.1.4.0) I re-implemented it in the example application
    at http://www.consideringred.com/files/oracle/2010/TableFilterDateFormatIssueApp-v0.05.zip
    It has a filter-emp-workaround-btf task-flow with a method-call activity on a managed-bean method, responsible for clearing the search fields, resulting in behaviour where the error "The date is not in the correct format." does not occur,
    as can be seen in the screencast at http://screencast.com/t/Nq7TkkRQ
      public void clearFilterFields()
        BindingContainer vBindingContainer =
          BindingContext.getCurrent().getCurrentBindingsEntry();
        DCBindingContainer vDCBindingContainer = (DCBindingContainer)vBindingContainer;
        DCDataControl vDCDataControl = vDCBindingContainer.getDataControl();
        ApplicationModule vApplicationModule = vDCDataControl.getApplicationModule();
        ViewObject vViewObject = vApplicationModule.findViewObject("EmployeesVOVI");
        ViewCriteriaManager vViewCriteriaManager = vViewObject.getViewCriteriaManager();
        vViewCriteriaManager.clearViewCriterias();
        vViewObject.clearCache();
      }Because the managed-bean method requires access to the ADF Model binding layer to get to the View Object instance used for the filtered table, the method-call activity has a page element configured in DataBindings.cpx referring to the same usageId as the page element for the page fragment showing the filtered table. So that both the method-call and view activity depend on one and the same Binding Container (e.i. PageDef file).
    The method-call activity, responsible for clearing the search fields, would need to be called before each task-flow-return activity.
    As there can be multiple view activities with multiple filtered tables in a bounded task-flow, would that result in multiple method-call activities responsible for clearing search fields (all to be called before each task-flow-return activity)?
    It looks like a more general/generic approach is desirable for the suggested workaround to be feasible.
    - (q5) Does the suggested workaround imply (as bug 10193260 is not a bug) that all bounded task-flows with filtered tables should implement it to avoid errors about formatting?
    thanks
    Jan

Maybe you are looking for

  • How can I use 2 iPhone 4's on same iTunes account, but NOT sync same contacts?

    How can I use 2 iPhone 4's on same iTunes account, but NOT sync same contacts?

  • Error message when receive a fillable form back from patient

    Hello: The image below is an error message we received when the patient emails us back the survey form we have emailed to them. How do we fix so we can gather the data that was sent to us?

  • Making the region items readonly.

    I have a default single column that corresponds to a VO that uses a single select statement in my page. This page is used for inserting into table. When user enter the details and press continue button, i need to use forwardImmediatelyToCurrentPage()

  • Registering email password

    I have a BB 8520 corve .I was obliged by Yahoo to reset my email password a few days ago ,and since then I have not been receiving Yahoo emails on my BB .From other provider - OK on BB,and Yahoo ok on iMac . My broadband/mobile provider is Talktalk .

  • MacBook Pro boots up... yet screen is black after repair.

    So, after my 2007 MacBook Pro 17" kept crashing after overheating, I figured my issues may be due to dust. So after watching a bunch of tutorials on how to do this... I finally cracked open my MacBook Pro last night and began to clean out all the dus