Routine to convert dats to dec format

Hi experts..
                 I have one cube having date in DEC format and flatfile having date in DATS(yyyymmdd) format. i have used a routine in transfer rules as follows..
DATA: dats1 type p.
dats1 = TRAN_STRUCTURE-calday.
RESULT = dats1.
but i m not getting the date in cube in DEC format...?
Plz correct me...

sorry use TYPE /BIC/OIZDEC_DATE instead of LIKE...
one question, how is this filed stored in your cube fact table at the end?
Can you see the /BIC/F<cube> value in SE16 and let me know?
Can you also try to post your yyyymmdd directly without any routine? What's the result?
Perhaps the system converts it automatically into yyyymmdd anyway; this would mean that the behaviour is correct thus why do you want to post the numeric representation anyway??
Olivier.
Message was edited by:
        Olivier Cora

Similar Messages

  • How to convert date from ccyymm format to mmddyy

    hi,
    How to convert date from ccyymm format to mmddyy

    Please don't multipost. This question has been answered in your first post.
    How to convert date to ccyymm format
    Regards,
    Jo

  • How to convert date to ccyymm format

    Hi,
    How to convert date to ccyymm format.
    Thanks

    dadivela wrote:
    Re: How to convert date from ccyymm format to mmddyyI didn't inderstand. Date doesn't have any format. If you have a string in CCYYMM format, you would have to extract the YYMM from the string.
    SQL> SELECT   SYSDATE,
      2           TO_CHAR (SYSDATE, 'ccyymm') Date_Fm,
      3           SUBSTR (TO_CHAR (SYSDATE, 'ccyymm'), 3) YYMM
      4    FROM   DUAL
      5  /
    SYSDATE   DATE_F YYMM
    08-JUN-09 210906 0906You can use this string to convert it to date. Note that since DD part of your date was not their in the resultan string, the converted date will fall back to first of the month specified.
    SQL> SELECT   SYSDATE,
      2           TO_CHAR (SYSDATE, 'ccyymm') Date_Fm,
      3           SUBSTR (TO_CHAR (SYSDATE, 'ccyymm'), 3) YYMM,
      4           TO_DATE (SUBSTR (TO_CHAR (SYSDATE, 'ccyymm'), 3), 'YYMM') conv_Dat
    e
      5    FROM   DUAL
      6  /
    SYSDATE   DATE_F YYMM             CONV_DATE
    08-JUN-09 210906 0906             01-JUN-09
    SQL>Then convert the date into the required format using TO_CHAR Function
    SQL> SELECT   SYSDATE,
      2           TO_CHAR (SYSDATE, 'ccyymm') Date_Fm,
      3           SUBSTR (TO_CHAR (SYSDATE, 'ccyymm'), 3) YYMM,
      4           TO_DATE (SUBSTR (TO_CHAR (SYSDATE, 'ccyymm'), 3),
      5                   'YYMM') conv_Date,
      6           TO_CHAR(TO_DATE(SUBSTR(TO_CHAR (SYSDATE, 'ccyymm'),3),
      7                   'YYMM'), 'MMDDYY') New_Format
      8    FROM   DUAL
      9  /
    SYSDATE   DATE_F YYMM             CONV_DATE NEW_FO
    08-JUN-09 210906 0906             01-JUN-09 060109
    SQL>Hope this helps.
    Regarads,
    Jo

  • Converting Date Column to format MM/DD/YYYY in RPD

    Hi all,
    I have a requirement like converting a Date column to format MM/DD/YYYY in RPD. Any help as we are not supposed to use the BI Answers Data Fomat for showing this format.
    Thankyou,
    Edited by: [email protected] on May 10, 2010 11:49 PM

    Hi Saichand,
    I need the resulting column in DATE format only. The solution which you specified converts the datatype to character. Is there anyway to convert the format but not the datatype.

  • How to convert date to system format

    Is there any function module for converting the date in YYYYMMDD format to our own system format. eg. 21.07.2006

    Hi Abinaya,
    Use this func module <b>CONVERSION_EXIT_PDATE_OUTPUT</b>
    Please award points if u find it useful
    Regards,
    Viven

  • Convert date in sql format

    how to convert a date in string format to sql date format?
    thanx in advance

    Use java.text.SimpleDateFormat to parse the String into a java.util.Date.
    Create a java.sql.Date from the java.util.Date.
    Use a PreparedStatement and its setDate() method to set the date in the SQL. The JDBC driver will take care of putting that java.sql.Date object into the correct format for your DB.

  • Convert date to internal format

    Hi,
    I am getting date in the format as detailed below:
    10/16/2005, 6/16/2005, 10/6/2005 - MM/DD/YYYY
    I have to convert it to the internal date format.
    Please help with the code.
    Thanks
    SAPBW

    Hi,
    Use Function module <b>CONVERT_DATE_TO_INTERNAL</b>.
    It will consider all types of date formats 10/16/2005, 6/16/2005, 10/6/2005 etc. Whether you will give 1 or 2 digits to month or date. You can also give 2 digits to year even then it will converts to internal format.
    <b>You need to give dates in User defined format otherwise it generates an exception DATE_EXTERNAL_IS_INVALID.</b>
    DATA V_EXT_DATE(10) VALUE '10/06/2005'.
    DATA V_DATE TYPE SY-DATUM.
    CALL FUNCTION 'CONVERT_DATE_TO_INTERNAL'
      EXPORTING
        date_external                  = V_EXT_DATE
      IMPORTING
        DATE_INTERNAL                  = V_DATE
      EXCEPTIONS
        DATE_EXTERNAL_IS_INVALID       = 1
        OTHERS                         = 2.
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    WRITE:/ 'INTERNAL FORMAT OF DATE IS: ', V_DATE.
    Thanks,
    Vinay
    Thanks,
    Vinay

  • How to convert date in varchar format to TimeZone format?

    Hi,
    Iam having a date '14-05-08 09:46:35 AM' (in Varchar format). How to convert this date to TimeZone ('IYYY-MM-DD"T"HH12:MI:SS"Z"FX') format?
    For Example,
    My input date is '14-05-08 09:46:35 AM' and I need output as '2008-05-14T09:46:35Z'.
    How to convert this?
    Thanks in Advance.

    Hi,
    You would look up the TO_TIMESTAMP and the TO_CHAR functions in the SQL reference manual for the version you don't mention, and make up the solution yourself, rather than asking someone else to do your homework.
    Sybrand Bakker
    Senior Oracle DBA

  • Converting date in french format

    Hi All,
    Hi All,
    Please let me know if you have any idea
    I am converting the date to French /infact multi lang
    select to_char(sysdate,'Fmddth Month, yyyy','NLS_DATE_LANGUAGE =FRENCH') from dual
    so this is giving me "8th Septembre, 2011"
    but what i want is "8er Septembre, 2011" instead of "th" i need "er"
    Thanks & Regards,
    Dhana

    from http://download.oracle.com/docs/cd/B19306_01/server.102/b14225/ch3globenv.htm
    Example 3-12 NLS_DATE_LANGUAGE=FRENCH, Month and Day NamesAs an example of how to use NLS_DATE_LANGUAGE, set the date language to French:
    ALTER SESSION SET NLS_DATE_LANGUAGE = FRENCH;
    Enter a SELECT statement:
    SELECT TO_CHAR(SYSDATE, 'Day:Dd Month yyyy') FROM DUAL;
    You should see output similar to the following:
    TO_CHAR(SYSDATE,'DAY:DDMONTHYYYY')
    Vendredi:07 Décembre 2001
    When numbers are spelled in words using the TO_CHAR function, the English spelling is always used. For example, enter the following SELECT statement:
    SQL> SELECT TO_CHAR(TO_DATE('12-Oct.-2001'),'Day: ddspth Month') FROM DUAL;
    You should see output similar to the following:
    TO_CHAR(TO_DATE('12-OCT.-2001'),'DAY:DDSPTHMONTH')
    Vendredi: twelfth Octobre

  • Convert date format from MONTH-YEAR to  dd/mm/yyyy

    Dear All
    i want to get parameter in form of MONTH-YEAR AND WANT TO CONVERT DATE INTO 'THIS FORMAT dd/mm/yyyy' IT GIVES ME ERROR PLEASE GUIDE.
    SELECT
    TO_CHAR (PTP.END_DATE,'MONTH-YY') ,
    to_date ( TO_CHAR (PTP.END_DATE ,'DD-MONTH-YYYY') ,'dd/mm/yyyy'),
    --- i want to gent parameter in from of MONTH-YEAR AND WANT TO CONVERT DATE INTO 'THIS FORMAT dd/mm/yyyy' IT GIVES ME ERROR PLEASE GUIDE
    to_date ( TO_CHAR (PTP.END_DATE ,'MONTH-YYYY') ,'dd/mm/yyyy'),
    ADD_MONTHS((to_date ( TO_CHAR (PTP.END_DATE ,'MONTH-YYYY') ,'dd/mm/yyyy'),-1)
    --- i want to gent parameter in from of MONTH-YEAR AND WANT TO CONVERT DATE INTO 'THIS FORMAT dd/mm/yyyy' IT GIVES ME ERROR PLEASE GUIDE
    ptp.END_DATE PERRIODS_NAME
    from per_time_periods ptp
    Regards
    Edited by: user10941925 on Nov 28, 2011 12:23 AM

    Hello just check
    SQL> select hiredate from emp;
    HIREDATE
    17-DEC-80
    20-FEB-81
    22-FEB-81
    02-APR-81
    28-SEP-81
    01-MAY-81
    09-JUN-81
    09-DEC-82
    17-NOV-81
    08-SEP-81
    12-JAN-83
    03-DEC-81
    03-DEC-81
    23-JAN-82
    14 rows selected.
    SQL> select to_char(hiredate,'month-year') from emp;
    TO_CHAR(HIREDATE,'MONTH-YEAR')
    december -nineteen eighty
    february -nineteen eighty-one
    february -nineteen eighty-one
    april    -nineteen eighty-one
    september-nineteen eighty-one
    may      -nineteen eighty-one
    june     -nineteen eighty-one
    december -nineteen eighty-two
    november -nineteen eighty-one
    september-nineteen eighty-one
    january  -nineteen eighty-three
    december -nineteen eighty-one
    december -nineteen eighty-one
    january  -nineteen eighty-two
    14 rows selected.
    SQL> select to_char(hiredate,'dd/mm/yyyy') from emp;
    TO_CHAR(HI
    17/12/1980
    20/02/1981
    22/02/1981
    02/04/1981
    28/09/1981
    01/05/1981
    09/06/1981
    09/12/1982
    17/11/1981
    08/09/1981
    12/01/1983
    03/12/1981
    03/12/1981
    23/01/1982
    14 rows selected.
    SQL>

  • Convert data from cobol to SAP-R/3

    Hi Experts,
    Plz let me to know, How to Convert data in cobol format to SAP-R3?
    I get Cobal data in a file that should be updated to SAP..
    Thanks & Regards,
    SarathS.

    Hi.
    It should be in excel sheet if you want transafer data from any Legacy to SAp,Not only cobol,so first convert data to excel then trasfer to SAP.
    Regards.
    jay

  • How to convert date dd.mm.yyyy TO Month ddth YYYY?

    hi friends,
    how to convert date into this format.
    ex:
    date : 04.11.2008
    has to convert as
    October 04th, 2008
    th has to be set SUPERSCRIPT.
    Plz any helps....
    Regards,
    Shankar.

    check this..FM
    CONVERT_DATE_TO_EXTERNAL
    or we can do this using split or concatenate functions like below
    *CALCULATING THE MONTH FOR THE BODY OF THE EMAIL MSG
      IF GD_EBODY_BB = '01' .
        GD_EBODY_BB = 'January' .
      ELSEIF GD_EBODY_BB = '02' .
        GD_EBODY_BB = 'February' .
      ELSEIF GD_EBODY_BB = '03' .
        GD_EBODY_BB = 'March' .
      ELSEIF GD_EBODY_BB = '04' .
        GD_EBODY_BB = 'April' .
      ELSEIF GD_EBODY_BB = '05' .
        GD_EBODY_BB = 'May' .
      ELSEIF GD_EBODY_BB = '06' .
        GD_EBODY_BB = 'June' .
      ELSEIF GD_EBODY_BB = '07' .
        GD_EBODY_BB = 'July' .
      ELSEIF GD_EBODY_BB = '08' .
        GD_EBODY_BB = 'August' .
      ELSEIF GD_EBODY_BB = '09' .
        GD_EBODY_BB = 'September' .
      ELSEIF GD_EBODY_BB = '10' .
        GD_EBODY_BB = 'October' .
      ELSEIF GD_EBODY_BB = '11' .
        GD_EBODY_BB = 'November' .
      ELSEIF GD_EBODY_BB = '12' .
        GD_EBODY_BB = 'December' .
      ENDIF .
    *ATTACHMENT SUBJECT LINE MODIFICATION
      IF GD_EBODY_CC = '01'.
        CONCATENATE GD_EBODY_CC 'st' INTO GD_EBODY_CC .
      ELSEIF GD_EBODY_CC = '02' .
        CONCATENATE GD_EBODY_CC 'nd' INTO GD_EBODY_CC .
      ELSEIF GD_EBODY_CC = '03' .
        CONCATENATE GD_EBODY_CC 'rd' INTO GD_EBODY_CC .
      ELSEIF GD_EBODY_CC = '31'.
        CONCATENATE GD_EBODY_CC 'st' INTO GD_EBODY_CC .
      ELSEIF GD_EBODY_CC = '21'.
        CONCATENATE GD_EBODY_CC 'st' INTO GD_EBODY_CC .
      ELSE .
        CONCATENATE GD_EBODY_CC 'th' INTO GD_EBODY_CC .
      ENDIF .
    regards
    ansumesh
    Edited by: Ansumesh Kumar Samal on Nov 4, 2008 9:02 AM

  • FM for Convert Date

    Hi
    I need to convert dates from user format to internal format.
    Does some body knows wich FM can i use for convert text field  '15.3.2010'   to  date field  '20100315'   ?
    Regards
    Frank

    Moderator message - Please see How to post code in SCN, and some things NOT to do... before posting (date question) - post locked
    Rob

  • How can I convert date in FOX (from DEC to date[DEC])

    Hi everyone!
    In my planning layout I have a field called "MYDATE" of the date-type "DEC: Calculation or amount field with comma and +/- sign" (-> BPS does not allow using DATS as date-type).
    Since I import that date from a different system, I have to use a temporary workaround field "WADATE" (WorkaroundDate) of type DEC (alternatively integer or float) which contains the date in a format YYYYMMDD (e.g. 20070604).
    How can I transfer the date from WADATE to MYDATE? I tried using FOX, but for some reason it does not work. When I use the following function, MYDATE remains empty:
    DATA TMPDATE TYPE F.
    DATA MYPROJECTS TYPE B906_PROJ.
    FOREACH MYPROJECTS.
    "MYDATE" is the field I want my date in
    "WADATE" is my workaround field that contains the date
    TMPDATE = {WADATE,000,0000000001,0000000001,001}.
    BREAK-POINT.
    {MYDATE,000,0000000001,0000000001,001} = TMPDATE.
    ENDFOR.
    Is it possible to solve my problem with FOX? Or do I have to work with an EXIT function?
    Best regards, Daniel

    Daniel,
    The better approach is the one Marc said but if you have tomake a work around work, I think you might need to try and define your temporary date variable as String and another for the converted date as of type of the final date.  I would not define any date type as float unless you can have part days and it is very important to have part days, integer might work by I would try String first myself.
    It has been a while but on a BW 3.5 project I had to do some manipulation to read the attribute value of material master data to get the launch date and use it to derive the start period (definited as type 0FISCPER) and proportion of month based on number of days remaining after launch date vs the # of days for the month.  I think I used string type function in FOX to derive some of the component...
    Hope this helps,
    mary

  • Need help in converting date format

    Hi,
    Need help in converting date format from 'DD-MON-YYYY' to 'YYYY-MM-DD' in an .rtf template as I believe xml publisher supports the date format as 'YYYY-MM-DD' only.
    Thanks,
    Raj.

    I got the same problem, anyone know how to solve this problem? I allready found some date functions on http://blogs.oracle.com/xmlpublisher/2008/09/date_functions.html . I also tried <?xdoxslt:month_name(xdoxslt:get_month(xdofx:substr(NEED_BY_DATE, 4,3)), $_XDOLOCALE), 0, 'nl-NL')?>, but then it returns a namespace error (Caused by: oracle.xdo.parser.v2.XPathException: Namespace prefix 'xdofx' used but not declared.). Anyone know how to fix this?
    Edited by: user11165753 on 7-dec-2009 23:50

Maybe you are looking for

  • Urgent issue REPORT FOR ALL MATERIAL BASED ON STOC TYPE

    Hi I want report for based on stock type i want to check the stock for all mterial with  stock type "quality inspction" i want that type of material documents is it possible to see the report regards sesidhar

  • Search help for table control input value

    Hi, We have designed a GUI for supply invoice approval workflow with table control. In the table control fields, we assigned one search help on one field. We can enter the values(F4 Help) up 8 row in the default screen, which is having 8 row. After s

  • My Win 7 PC isn't visible after lion boot up

    Hi all After updating to lion and all the dissapointments so far, one of the worst things for me is that my Win 7 and Win XP PC's are not visible in the finder for the first 8-15 minutes after the boot. Even when i try to connect them directly (cmd +

  • Read XSL-FO file in Flex

    Hi,       I am trying to read XSL-FO file in flex like XML. but i could not. This file has tags with namespace means (fo:),so i could not find the way to read these tags. Is there anyway i can read XSL-FO File in Flex. Example :   <fo:layout-master-s

  • When burning a playlist to disc, how do you keep the songs in original order?

    When burning a playlist to disc, how do you keep the songs in original order?