<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Date format in CSV file in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/date-format-in-csv-file/m-p/5605000#M1277270</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;u might have declared the variable type as date/sy-datum, instaed declare it as char with length 10.&lt;/P&gt;&lt;P&gt;After the data is moved into ur variable , then u can move it  date field using " &lt;STRONG&gt;WRITE....To...&lt;/STRONG&gt;' or &lt;STRONG&gt;offsets&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Naveen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 19 May 2009 05:06:09 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-05-19T05:06:09Z</dc:date>
    <item>
      <title>Date format in CSV file</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date-format-in-csv-file/m-p/5604996#M1277266</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am working on loading program which downloads the application server CSV file to internal table.&lt;/P&gt;&lt;P&gt;In the CSV file there is a field date in the format (22/05/2008). When I move this to my internal table field date, it is truncating to '22/05/20'. How to solve this issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can I load into internal table with the same format?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Shreekant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 May 2009 05:02:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date-format-in-csv-file/m-p/5604996#M1277266</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-19T05:02:00Z</dc:date>
    </item>
    <item>
      <title>Re: Date format in CSV file</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date-format-in-csv-file/m-p/5604997#M1277267</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Try to get it to into char field of length 10.Date field has 8 length so it is truncating.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nithya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 May 2009 05:04:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date-format-in-csv-file/m-p/5604997#M1277267</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-19T05:04:36Z</dc:date>
    </item>
    <item>
      <title>Re: Date format in CSV file</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date-format-in-csv-file/m-p/5604998#M1277268</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I guess you have declares it with  sy-datum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Declare like this, this if you want ' / ' in between also.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data : date(10) type c.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 May 2009 05:05:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date-format-in-csv-file/m-p/5604998#M1277268</guid>
      <dc:creator>GauthamV</dc:creator>
      <dc:date>2009-05-19T05:05:07Z</dc:date>
    </item>
    <item>
      <title>Re: Date format in CSV file</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date-format-in-csv-file/m-p/5604999#M1277269</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pl. check the declaration of the date field in your itab, say if it is dd/mm/yy&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks\&lt;/P&gt;&lt;P&gt;Mahesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 May 2009 05:06:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date-format-in-csv-file/m-p/5604999#M1277269</guid>
      <dc:creator>former_member222860</dc:creator>
      <dc:date>2009-05-19T05:06:07Z</dc:date>
    </item>
    <item>
      <title>Re: Date format in CSV file</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date-format-in-csv-file/m-p/5605000#M1277270</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;u might have declared the variable type as date/sy-datum, instaed declare it as char with length 10.&lt;/P&gt;&lt;P&gt;After the data is moved into ur variable , then u can move it  date field using " &lt;STRONG&gt;WRITE....To...&lt;/STRONG&gt;' or &lt;STRONG&gt;offsets&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Naveen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 May 2009 05:06:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date-format-in-csv-file/m-p/5605000#M1277270</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-19T05:06:09Z</dc:date>
    </item>
    <item>
      <title>Re: Date format in CSV file</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date-format-in-csv-file/m-p/5605001#M1277271</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Please check below code.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'GUI_UPLOAD'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      filename                     = v_filename_string&lt;/P&gt;&lt;P&gt;      filetype                       = 'ASC'&lt;/P&gt;&lt;P&gt;      has_field_separator     = 'X'&lt;/P&gt;&lt;P&gt;      dat_mode                  = 'I'&lt;/P&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      data_tab                    = it_input&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 May 2009 05:12:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date-format-in-csv-file/m-p/5605001#M1277271</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-19T05:12:19Z</dc:date>
    </item>
    <item>
      <title>Re: Date format in CSV file</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date-format-in-csv-file/m-p/5605002#M1277272</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Rangrej&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As all Suggested assign first this date to char type filed length 10 and using following way you can assign this to type date. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Test Sample Code Bellow.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;TYPES: BEGIN OF ty_test,
  cdate(10),
  date LIKE sy-datum,
  END OF ty_test.

DATA: it_test TYPE STANDARD TABLE OF ty_test WITH HEADER LINE.

it_test-cdate = '22/05/2008'. APPEND it_test.
it_test-cdate = '23/05/2008'. APPEND it_test.
it_test-cdate = '24/05/2008'. APPEND it_test.
it_test-cdate = '25/05/2008'. APPEND it_test.
it_test-cdate = '26/05/2008'. APPEND it_test.

LOOP AT it_test.
  it_test-date+0(4) = it_test-cdate+6(4).
  it_test-date+4(2) = it_test-cdate+3(2).
  it_test-date+6(2) = it_test-cdate+0(2).
  MODIFY it_test INDEX sy-tabix.
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Faisal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 May 2009 05:16:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date-format-in-csv-file/m-p/5605002#M1277272</guid>
      <dc:creator>faisalatsap</dc:creator>
      <dc:date>2009-05-19T05:16:13Z</dc:date>
    </item>
  </channel>
</rss>

