Date conversion from YYYYMMDD to DD.MM.YYYY

Hi,
I'm trying to load some data from a flat file into BW. I have a date column in the CSV file that has the date in YYYYMMDD format. when I load it into Bw, I want to change the format to DD.MM.YYYY .
I have written a small routine that should do this, but it doesn't seem to work.
data:v_date like sy-datum,
v_date1(10) type c.
Concatenate v_date+6(2) '.' v_date+4(2) '.' v_date+0(4) into v_date1.
RESULT = V_DATE1.
The result of this routine is YY.YYMM.DD instead of DD.MM.YYYY.
Can anyone tell me where I'm going wrong?
Thanks
Sam

Hi Keshu,
When I add the loop to my code, it doesn't seem to work. It gives me the following error:
does not match the user-dependent date format --> long text
Diagnosis
does not correspond to the date format that is assigned to the current user ASDSAD.
System Response
The date cannot be converted; the process was terminated.
Procedure
Enter the conversion exit RSDAT for automatic date format detection.
Any suggestions?

Similar Messages

  • Convert Date format from YYYYMMDD to MM/DD/YYYY --issue with Mapping

    Hi All ,
    I have IDOC(DESADV.DELVRY03-> file ) scenario which i am working on . While debugging noticed that the field :
    E1EDT13\NATNZ -Data Transformation(from yyyymmdd to mm/dd/yyyy)-Target .This works
    But say if IDOC doesn't pass any value (For Good's issue) I get Error during debugging : RuntimeException in Message-Mapping transformation: Unparseable date: ""
    I did check thsi blog : Convertinf Date format from YYYY-MM-DD to MMDDYYYY  but this is  about the Data Transformtaion.
    I tried using constants , create if , -these function doesn't work /not applicle in this case
    Could you please provide  inputs as to how to handle two condition :
    1. With date -- then transform
    2.Else , pass nothing

    Hi Varalakshmi,
    Plese try to use UDF for date conversion and include logic which would check the Space value from the source structure.
    so if there is space return as such
    else.
    perform the conversion logic.
      Convertinf Date format from YYYY-MM-DD to MMDDYYYY
    (The conversion logic has been provided by micheal in the thread you have provided in the query)
    Thanks,
    Ram.

  • Function module to change Date from YYYYMMDD to DD.MM.YYYY

    Hi
    PLease tell me the function module that will convert date from YYYYMMDD to DD.MM.YYYY
    Thanks

    Hi,
    data lv_date1 type sy-datum.
    data lv_date2(12).
    lv_date1 = '20070123'.
    concatenate lv_date16(2) lv_date14(2) lv_date1+0(4) into lv_date2
    separated by '.' .
    is what you require to do;
    now lv_date2 = 23.01.2007.
    Also look for conversion routine "CONVERSION_EXIT_PDATE_OUTPUT"
    EG: call function CONVERSION_EXIT_PDATE_OUTPUT
                             exporting input = lv_date1
                             importing output = lv_date2.
    Thanks,
    Anitha

  • Conversion from YYYYMMDD to Julian Date in BPEL

    Hi,
    My requirement is to convert date format from YYYYMMDD to Julian Date (CYYDDD) in BPEL.
    C - Stands for Century
    Would like to know a way to achieve this conversion in BPEL. Please suggest.
    Appreciate your quick help.
    Thanks
    Priyanka G

    Hi,
    I suggest you use a java activity for that... There are many examples in java on how to convert a date to julian...
    Cheers,
    Vlad

  • Function module to convert date format from yyyymmdd to mmddyyyy format

    function module to convert date format from yyyymmdd to mmddyyyy format

    Hi Rajitha,
    Do like this
    Data: Var1 type sy-datum,
             var2(8) type c.
    var1 = sy-datum.
    Concatanate var1+4(2) var1+6(2) var1+0(4) into var2.
    write var2.
    Reward Points if this helps,
    Satish

  • How do i do data conversion from 11.0.3 to 11.5.10?

    Hi to all,
    If any body have any approach how to do data conversion from 11.0.3 to 11.5.10 release?
    Thanx in Advance

    ajones2 wrote:
    I got the update to work but there seems to be one thing that does not work
    I'm anxious to install 4.5 as well because I understand the music player features a sound equalizer, but I believe it's not prudent to get it from somewhere other than your carrier.  I could be wrong, but I think that each carrier tweaks the OS in some fashion...
    Does your 4.5 have the sound equalizer ?
    George from Bedford, TX
    8120 on T-Mobile with BB Unlimited Email+Internet but
    without the BlackBerry Enterprise service

  • Date conversion from Excel to the SAP format

    Hi,
    I have created a BDC program which uploads daat from Excel sheet.
    There is a date field also, the format of which can be any as per the end user (it will be one of those allowed by SAP).
    However, the file will be used for execution by another user who may have a date setting which is different than that from the one in Excel.
    Eg. End User's date format: DD.MM.YYYY, SAP User's date format: MM/DD/YYYY
    So, how do I convert the date format from excel to the format which will be accepted by the transaction during the recording?
    Regards,
    Dave

    Hi Dave,
    I have faced the same issue while uploading the date to the bdc.
    if ur date format is DD.MM.YYYY in the excel file, first of all you need to change this to dats format ie YYYYMMDD ie character8 format and pass to the bdc, it will automatically convert to sap format
    ie you need to convert splitting at .
    data lv_date type char10,
            lv_dd type char02,
            lv_mm type char02,
           lv_yyyy type char04,
    v_date type char08.
    lv_date = '30.12.2011'.
    split lv_date at '.' into lv_dd lv_mm lv_yyyy.
    if strlen(lv_dd) lt 2.
       concatenate '0' lv_dd into lv_dd.
    endif.
    if strlen(lv_mm) lt 2.
       concatenate '0' lv_mm into lv_mm.
    endif.
    concatenate lv_yyyy lv_mm lv_dd into v_date.
    "Please use the variable V_DATE to populate to ur bdc"
    Edited by: Rahul Babukuttan on Aug 11, 2011 5:35 PM

  • GL Data Conversion from Legacy to Oracle EBS

    Hi All,
    I am tasked with converting legacy data into GL. I have worked on other conversions like supplier, AR and AP conversions but never worked on GL conversion, so I don't know how and where to start, what are the pre-requisites for entering data into gl_interface table how to ensure that data is correct in the .csv file etc.
    Kindly request you all to guide me in right direction. Hope to hear from you all very soon!!! :)
    Regards

    Hi,
    When you talk about GL-Data it is the trial balance to be loaded from legacy to oracle applications.
    You can use Web-ADI to upload it ,the check list are
    The balance for each account comibnation in the legacy system to be mapped to GL-Oracle code combination balance
    With respect to open AR, AP Invoices if the invoices are converted using a control account for migration in GL then
    the the balance transfered from AP,AR need not be reversed in GL from the source receivables and payables.
    In case if the same account combination are for migrating the balances from AP,AR to GL ..Then the balances transferred from AP,AR should be reversed ..so that it does not affect the TB-GL-Balance
    Finally ensure that the balance for the TB-tallys with your legacy system and upload it using Web-ADI ,import and
    review and post it.
    Hope this points helps your GL-Data conversion.
    Regards,
    Ramaa

  • Date conversion from mm/dd/yyyy to 'yyyymmdd'

    Hi,
    I want to convert the 'mm/dd/yyyy' to 'YYYYMMDD'.
    l_endlate = '12/17/2006'
    gw_flatfile-zzenddate format is 'YYYYMMDD'
    The following function module has error.  I think the dype is not right.  What should I put there?   Or do you have better suggestion?
        CALL FUNCTION 'CONVERT_DATE_TO_INTERN_FORMAT'
          EXPORTING
            datum = l_enddate
            dtype = 'DATS'
          IMPORTING
            idate = gw_flatfile-zzenddate.
    Thanks,
    Helen

    Hi,
    You can use the following code:
    *-Local variables-
      DATA: lf_length TYPE i,
                ex_date TYPE char10,
                in_date TYPE begda
    *-Local constants--
      DATA:lc_8 TYPE char1 VALUE '8',
           lc_9 TYPE char1 VALUE '9',
           lc_10 TYPE char2 VALUE '10',
           lc_0 TYPE char1 VALUE '0',
           lc_limit TYPE char1 VALUE '/'.
      lf_length = STRLEN( ex_date )."Length of the external date field.
      IF NOT ex_date CA lc_limit.
       MESSAGE 'wrong format' TYPE 'E'.
      ENDIF.
      CASE lf_length.
        WHEN lc_8.
          IF ex_date1(1) EQ lc_limit AND ex_date3(1) EQ lc_limit.
            CONCATENATE ex_date+4(4) lc_0 ex_date(1)
            lc_0 ex_date+2(1) INTO int_date.
          ENDIF.
        WHEN lc_10.
          IF ex_date2(1) EQ lc_limit AND ex_date5(1) EQ lc_limit.
            CONCATENATE ex_date+6(4) ex_date(2)
             ex_date+3(2) INTO int_date.
          ENDIF.
        WHEN lc_9.
          IF ex_date1(1) EQ lc_limit AND ex_date4(1) EQ lc_limit.
            CONCATENATE ex_date+5(4) lc_0 ex_date(1)
             ex_date+2(2) INTO int_date.
          ELSEIF ex_date2(1) EQ lc_limit AND ex_date4(1) EQ lc_limit.
            CONCATENATE ex_date+5(4) ex_date(2) lc_0
            ex_date+3(1) INTO int_date.
          ENDIF .
      ENDCASE.

  • How to convert date from "yyyymmdd" to "MM/DD/YYYY" format

    1. I have one BLDAT field in my internal table.
       its getting updated from input file.
    2. The value in the input file is like yyyymmdd.
       So the internal table field is filled like this
       "YYYYMMDD".
    3. After this,I have to compare this internal table  
       field with BSAD table.
    4. The BLDAT field in BSAD table is in the format of 
       "MM/DD/YYYY".
    5. the BLDAT field is having diff format in internal  table and BSAD table.So I am unable to check this value.
    How to convert it as like the BSAD table format."MM/DD/YYYY" format.
    Thanks in advance!!

    Using the WRITE statement
      data: gd_date(10).  "field to store output date
    * Converts date from 20020901 to 09.01.2002
      write sy-datum to gd_date mm/dd/yyyy.
    OR u can
    CONCATENATE gd_date+4(2) gd_date+6(2) gd_date+0(4)
    into gd_date seperated by '/' .
    Hope this helps.
    Kindly reward points and close the thread for the
    answer which helped u OR get back with queries.

  • Date Conversion from GMT to Local and Local To GMT considering DST.

    Hi,
    I have a application which displays the time in GMT across all the screens,and saves in Local/Default TimeZone as application would be deployed in europe and India.I have written a utility which does the conversion.
    I just want to know that how to handle the Daylight Saving Time[DST] as we are taking the data from database and converting it to LocalTime Zone.This works fine but what would happen if the sever time is changes due to DST.There would be problem between the object saved before the DST and after DST because we are simply converting stored time to GMT to show on the screen.
    Please share if you some solution/suggestions.
    Thanks.
    Akash.

    YoungWinston wrote:
    jschell wrote:
    That statement is phrased oddly.
    A java.util.Date uses a UTC offset with millisecond resolution.
    A jdbc driver converts that value into a "correct" value for the target database.And from.
    The form that is stored in the database is entirely database dependent. The actual form stored in the database can take many forms.True, but it is highly likely to be an offset from some "epoch" (Progress, for example, uses 00:00:00 1/1/-3714 UTC as I recall, and has 1-second granularity).Yes but as I said the phrasing was odd. A timestamp, by definition, must be an offset of something. Doesn't matter how it is represented. After all the year 2009 is an offset in the Gregorian calander.
    However in terms of actual storage the way it is stored is unlikely to be similar to what Java does. As examples neither Oracle nor MS SQL Server uses a single numeric offset.
    It might not even have a concept of timezone.Again true, although I've yet to come across one; and since OP is only concerned about the timezone in Java I'm not quite sure how relevant that is.
    Relevant in terms of the description in terms of what java does, what the database does and how it gets from java to the database.
    I would also expect any JDBC driver that cannot translate to or from a Java date correctly to document the fact in 60-point bold type, since it's a violation of the implied contract of ResultSet.getDate().Except that depends on your definition of "correct".
    Examples of that
    - Oracle doesn't have millisecond resolution at all in its common format.
    - MS SQL Server doesn't have the same resolution as java, instead there is an odd resolution (one three-hundredth of a second).
    - MS SQL Server doesn't have timezones, so if you don't take care and your data crosses timezones the timestamp will be different.
    The drivers will not warn you of things like that. At least not that I have seen.
    Format for Oracle.
    [http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:77562635789106]
    Format for MS SQL Server
    [http://msdn.microsoft.com/en-us/library/aa258277(SQL.80).aspx]

  • Date conversion from selections creen

    i need to convert the date input received from selection screen  which is in the format (YYYYMMDD) into a format which is of one date field type in some table in order to check the conditions in where clause..
    can any one pls help me with this
    Also how to do the validations for the date field entry in the selection screen

    Use T.Code --> SU3; go to defaults & maintain your <b>date format</b> there.
    Reward Points if it helps,
    Regards,
    N

  • Data conversion from 212 format

    I found a problem during conversion data.
    I have a file which contains ASCII characters (in fact they're look
    like ASCII on any editor) . I have to convert them to integer but I
    know that data are organised into pairs of 12bit numbers packed into
    byte triplets (format 212).
    I made some vi (which convert 2 following ASCII characters to binary,
    then divide them to pairs of 4bits, then some rotation etc..) but the
    whole conversion takes too much time (64kb file conversion is taking
    approx. 1minute).
    Thank you for any suggestions,
    Michael ([email protected])

    Dear Michal,
    I hope this vi work faster.
    Input: 3bytes, data type unsigned int (U8)
    Output: 2 values, data type integer. (INT16)
    of course read all file to memory. Don't read everytime from file by 3
    bytes.
    Deniss
    ps. vi i send by e-mail.
    "Michal Szaj" wrote in message
    news:[email protected]..
    > On Wed, 18 Sep 2002 02:27:25 GMT, Greg McKaskle
    > wrote:
    >
    > >This is one of those things that is quite sensitive to how it is coded.
    > > If you make your VI available, others, including myself can give you a
    > >hand with speeding it up.
    > >
    > >As for guessing at what might be going on, first look at the array wire.
    > > If you are using locals or property nodes to access the a
    rray, that is
    > >the cause. If the array is written to a global and later accessed via
    > >the global, that is causing it.
    > >
    > >I suspect that the bit manipulations on 64K should take something like a
    > >few seconds.
    > >
    > >Greg McKaskle
    >
    > Thank you for your support.
    >
    > In this case I have only one vi and I don't use any global/local
    > variables.
    > At the beginning of the vi I load all text character from file to
    > memory and then I'm making further operations.
    >
    > If it helps I can send the vi with data file.
    >
    > Thnx,
    >
    > Michael ([email protected])

  • How to change the date format from default to mm-dd-yyyy?

    Hi,
    There is a requirement to show the current date in an error message at the attribute level. That is, if the user input a date in a text field that is earlier than today's date, then an error message must immediately pop up with today's date in the message. To achieve this we are using a token expression in the EO ( Under Validation rules) . The token expression uses adf.currentDate to get today's date.
    The problem is that the expression extracts the date in the form of yyyy-mm-dd. What expression should I use to get the current date format in mm/dd/yyyy ? Can I modify the adf.currentDate expression in some way to get the desired format?
    Thanks,
    Anand

    You could write a custom EO method to return today's date in the specific format. Then access it via the Groovy adf.object expression.

  • Date Conversion from Julian to mm/dd/yy

    Does exists a java function that allow me to convert a date-string in Julian format to a string mm/dd/yy and viceversa?
    Thanx a lot in advance!
    aigor

    import java.lang.*;
    import java.util.Date;
    import java.text.SimpleDateFormat;
    public class DateEx1
    String dateString = "2002032";
    SimpleDateFormat julianDF = new SimpleDateFormat("yyyyddd");
    SimpleDateFormat slashLongDF = new SimpleDateFormat("dd/MM/yyyy");     
    static public void main( String[] args ) {
    try {
    Date inDate = julianDF.parse(dateString);
    System.out.println("Date is "+slashLongDF.format(inDate));
    catch (Exception ex) {
    System.out.println("Error: "+ex);
    regards
    Fintan

Maybe you are looking for