Converting date from DD.MM.YYYY  to  YYYY - MM - DD  format

Hi All,
Can you give me a way to convert date from DD.MM.YYYY  to  YYYY - MM - DD  format. Actually frm tables i am getting date in DD.MM.YYYY format.  And i want to print it in YYYY-MM-DD format.
Please reply.
Thanks And Regards,
Mayank Verma
Moderator message - Please search before asking. Date formatting is one of the most common questions asked - post locked
Edited by: Rob Burbank on Jul 6, 2009 10:42 AM

Hi,
Hey you can make use of offset  and concatenate statement to convert the date.
regards,
Ankur Parab

Similar Messages

  • 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.

  • 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

  • Need to convert  Date from calendar to String in the format dd-mom-yyyy

    Need to convert Date from calendar to String in the format dd-mom-yyyy+..
    This is absolutely necessary... any help plz..
    Rgds
    Arwinder

    Look up the SimpleDateFormat class: http://java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat.html
    Arwinder wrote:
    This is absolutely necessary... any help plz..For you maybe, not others. Please refrain from trying to urge others to answer your queries. They'll do it at their own pace ( if at all ).
    People on the forum help others voluntarily, it's not their job.
    Help them help you.
    Learn how to ask questions first: http://faq.javaranch.com/java/HowToAskQuestionsOnJavaRanch
    (Yes I know it's on JavaRanch but I think it applies everywhere)
    ----------------------------------------------------------------

  • Convert date from YYYYMMDD to DDMMYYYY

    Please help if anyone knows any function module to convert date from YYYYMMDD to DDMMYYYY format..
    Thanks in Advance,
    manjari

    Hello.
    Simply do like this:
    DATA: datum TYPE char10.
    WRITE sy-datum TO datum <format option>.
    <format options>:
    DD/MM/YY and MM/DD/YY:
    Both additions have the same effect. The date output has a two-digit year value and a separator. The separator and the order are taken from the definition for date output in the user master record.
    DD/MM/YYYY und MM/DD/YYYY:
    Both additions have the same effect. The date output has a four-digit year value and separator. The separator and the order are taken from the definition for date output in the user master record.
    DDMMYY und MMDDYY:
    Both additions have the same effect. The date output has a two-digit year value and no separator. The order is taken from the definition for date output in the user master record.
    YYMMDD:
    This addition provides a date output with a two-digit year value without a separator in the format YYMMDD.
    Regards.
    Valter Oliveira.

  • I want to convert date from Microsoft Access to Oracle.

    I want to convert date from Microsoft Access to Oracle.
    My Oracel date format is 21-Jul-2004 02:24:09 AM
    I use sqlldr in Oracle 9i Database and I
    write control file
    load data
    infile 'test.txt'
    into table test
    fields terminated by "," optionally enclosed by '"'
    trailing nullcols
    name,
    birthday
    data file 'test.txt' for input
    "dao","21-Jul-2004 02:24:09 AM"
    why did error? ORA-01843: not a valid month
    Thank.

    replace birthday with
    birthday "to_date(:birthday, 'DD-Mon-YYYY HH:MI:SS AM', 'NLS_LANGUAGE=''american''')"Of course, if your monthes are in German, then set the language to german (JUL=JUL but DEZ<>DEC)
    Regards
    Laurent

  • How to I convert data from oracle database into excel sheet

    how to I convert data from oracle database into excel sheet.
    I need to import columns and there datas from oracle database to microsoft excel sheet.
    Please let me know the different ways for doing this.
    Thanks.

    asktom.oracle.com has an excellent article on writing a PL/SQL procedure that dumps data to an Excel spreadsheet-- search for 'Excel' and it'll come up.
    You can also use your favorite connection protocol (ODBC, OLE DB, etc) to connect from Excel to Oracle and pull the data out that way.
    Justin

  • Convert data from internal table to XML file.

    Hi All,
    I am selecting data from database into one internal table.
    Now I want to convert data from internal table to xml file format and save in to my desktop. Please suggest me how I can achieve my requirement.
    Kindly reply me ASAP.

    Use this FM. SAP_CONVERT_TO_XML_FORMAT
    Check this link too -
    Re: Data Export in XML format
    XML files from ABAP programs

  • How can i convert data from DBF to oracle database 10g?

    Sir,
    How can i convert data from DBF to oracle database 10g?

    I assume you at least know how to dump the contents of foxpro dbf file into CSV format.
    Regarding SQL*Loader, hope this demo makes it a bit clear to you...
    http://www.princeton.edu/~storacle/sqlloader_demo.shtml
    I agree that it is an old web page (references Oracle 8.0.5) but basics remain the same.
    If it is still unclear to you after referring above link, then get an Oracle consultant.

  • 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

  • ALE, use bd79 (converting data from sender to receiver to blank out fields)

    Hi, I am trying to blank four fields out in our FI IDOC for a certain business reason.  These fields must be blank (it is the FIDCC1 message type).   I am trying to use transaction bd79 (converting data from sender to receiver) maintain rules.  Is there a way to blank out these fields using a conversion rule?  I can change data fine but I cannot find a way to blank or null a field out.  Thanks in advance.

    You should have a look at the inbound function module (linked to your inbound process code). sometimes there are checks that if fields are initial that nothing will be changed.

  • Steps to send data from BI 7.0 to PI in XML format...

    Hello everybody,
    Can somebody share any direct link to a document or thread where I can find step by step details as to how to send data from BI 7.0 to PI in XML format?
    I extracted data from ODS objects into CSV files through Open Hub Destination before, but need to know how to send same ODS data from BI to PI in XML format...
    Thanks in advance.
    ~S.H.

    just an idea:
    Maybe one way could be creating xml data via simple transformation or standard transformation in sap bw. After maybe there could create an inbound message in xi for getting the data.
    I never done it, but I thought this could be a practice?
    Hope there will be better comments for that problem, soon!

  • What is the best way to load and convert data from a flat file?

    Hi,
    I want to load data from a flat file, convert dates, numbers and some fields with custom logic (e.g. 0,1 into N,Y) to the correct format.
    The rows where all to_number, to_date and custom conversions succeed should go into table STG_OK. If some conversion fails (due to an illegal format in the flat file), those rows (where the conversion raises some exception) should go into table STG_ERR.
    What is the best and easiest way to archive this?
    Thanks,
    Carsten.

    Hi,
    thanks for your answers so far!
    I gave them a thought and came up with two different alternatives:
    Alternative 1
    I load the data from the flat file into a staging table using sqlldr. I convert the data to the target format using sqlldr expressions.
    The columns of the staging table have the target format (date, number).
    The rows that cannot be loaded go into a bad file. I manually load the data from the bad file (without any conversion) into the error table.
    Alternative 2
    The columns of the staging table are all of type varchar2 regardless of the target format.
    I define data rules for all columns that require a later conversion.
    I load the data from the flat file into the staging table using external table or sqlldr without any data conversion.
    The rows that cannot be loaded go automatically into the error table.
    When I read the data from the staging table, I can safely convert it since it is already checked by the rules.
    What I dislike in alternative 1 is that I manually have to create a second file and a second mapping (ok, I can automate this using OMB*Plus).
    Further, I would prefer using expressions in the mapping for converting the data.
    What I dislike in alternative 2 is that I have to create a data rule and a conversion expression and then keep the data rule and the conversion expression in sync (in case of changes of the file format).
    I also would prefer to have the data in the staging table in the target format. Well, I might load it into a second staging table with columns having the target format. But that's another mapping and a lot of i/o.
    As far as I know I need the data quality option for using data rules, is that true?
    Is there another alternative without any of these drawbacks?
    Otherwise I think I will go for alternative 1.
    Thanks,
    Carsten.

  • Convert data from one table to another

    SQL> select * from A;
    empid | mon_tips | tues_tips | wed_tips | thu_tips | fri_tips
    ----------------- ------------  --------- ----------+----------
    1 | 10 | 20 | 30 | 20 | 10
    2 | 10 | 20 | 30 | 40 | 50
    i want a SQL query that will convert the data from table A into table B with the following format:
    B(empid, Day, tips) where the column Day can take the values (Mon, Tue, Wed, Thu, Fri).
    Thanks in adavnce for the replies
    sqllearner

    creaate table B as (select empid, 'MONDAY' day_1, mon_tips tips from a
    union
    select empid, 'TUESDAY' day_1, tues_tips tips from a
    union
    select empid, 'WEDNESDAY' day_1, wed_tips tips from a
    union
    select empid, 'THURSDAY' day_1, thu_tips tips from a
    union
    select empid, 'FRIDAY' day_1, fri_tips tips from a)Cheers
    Sarma.

  • 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

Maybe you are looking for

  • How to put custom check box in a tableview column

    Hi, I would like to put a custom checkbox in a tableview column for each row of the table. Such that when the user selects the rows and among those rows if for fews rows this checkbox is active, i need to do some special processing. how can i add a c

  • Sub-sequent debit in scheduling agreement

    Hi All, My client is having requirement like this: Client receive the material against scheduling agreement and do the invoice verification,After verification & payment vendor will send the supplementry lnvoice for additional amount. In case of purch

  • Keyboard layout recognition

    Hi I am an italian user of FCS. As we know the program works by recognizing only the English keyboards. Every time I start the program I must set the keyboard layout in the Default US mode. Is there a way to avoid this? Or, at least, can automate thi

  • E6 (Belle) - Phone can sent but not receive emails

    Hello, I have set up a 2nd mailbox. The first mailbox functions fine. But with the second mailbox I can send, but not receive emails. Has anybody an idea how to solve that? Many thanks

  • Idoc File format

    Hi, 1, Where can see the IDOCS file format, whether is there any possibility of having different file format for different IDOCS? Please let me know one example for this.... Thanks in advance.