<?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 conversion in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/date-format-conversion/m-p/1083599#M98623</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 use the function module &lt;/P&gt;&lt;P&gt;CONVERT_DATE_TO_INTERN_FORMAT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Else&lt;/P&gt;&lt;P&gt;You declare the target field as type date, and directly move your source field into the target, SAP will automatically convert the target into internal format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Elini.P&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 24 Oct 2005 05:12:19 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2005-10-24T05:12:19Z</dc:date>
    <item>
      <title>Date format conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date-format-conversion/m-p/1083598#M98622</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;I would like to convert date from any format to YYYYMM.&lt;/P&gt;&lt;P&gt;Could any one suggest me how to go about?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Oct 2005 05:08:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date-format-conversion/m-p/1083598#M98622</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-10-24T05:08:17Z</dc:date>
    </item>
    <item>
      <title>Re: Date format conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date-format-conversion/m-p/1083599#M98623</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 use the function module &lt;/P&gt;&lt;P&gt;CONVERT_DATE_TO_INTERN_FORMAT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Else&lt;/P&gt;&lt;P&gt;You declare the target field as type date, and directly move your source field into the target, SAP will automatically convert the target into internal format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Elini.P&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Oct 2005 05:12:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date-format-conversion/m-p/1083599#M98623</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-10-24T05:12:19Z</dc:date>
    </item>
    <item>
      <title>Re: Date format conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date-format-conversion/m-p/1083600#M98624</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 this&lt;/P&gt;&lt;P&gt;WRITE: sy-datum,&lt;/P&gt;&lt;P&gt;     / sy-datum yymmdd.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&amp;amp;Regards,&lt;/P&gt;&lt;P&gt;Ruthra&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Oct 2005 05:14:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date-format-conversion/m-p/1083600#M98624</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-10-24T05:14:59Z</dc:date>
    </item>
    <item>
      <title>Re: Date format conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date-format-conversion/m-p/1083601#M98625</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Anu,&lt;/P&gt;&lt;P&gt;         its very much possible , but you must know whath the date format is given to you as input.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for example if its like sy-datum (YYYYMMDD).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you simply have to store the first six digit of the date into strng type variable:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: input_date like sy-datum value '20051231'. "31st dec of 2005&lt;/P&gt;&lt;P&gt;data: str(6).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;str = input_date(6).&lt;/P&gt;&lt;P&gt;write str.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thats it. you also can use some mask like ____/__/  for another solution. but you must do the coding specific to input format. that is if its YYYYMMDD your code will be as i have given, but if it is YYYYDDMM or DDMMYYYY, the code will be diffrent. there is no generic solution i think.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Oct 2005 05:15:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date-format-conversion/m-p/1083601#M98625</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-10-24T05:15:55Z</dc:date>
    </item>
    <item>
      <title>Re: Date format conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date-format-conversion/m-p/1083602#M98626</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;use function module  CONVERT_DATE_TO_INTERNAL&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and then read the first 6 characters...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;eg:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA l_date(10) TYPE c.&lt;/P&gt;&lt;P&gt;DATA lt TYPE sy-datum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;l_date = '24.10.2005'.&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'CONVERT_DATE_TO_INTERNAL'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    date_external                  = l_date&lt;/P&gt;&lt;P&gt; IMPORTING&lt;/P&gt;&lt;P&gt;   date_internal                  = lt&lt;/P&gt;&lt;P&gt; EXCEPTIONS&lt;/P&gt;&lt;P&gt;   DATE_EXTERNAL_IS_INVALID       = 1&lt;/P&gt;&lt;P&gt;   OTHERS                         = 2&lt;/P&gt;&lt;P&gt;          .&lt;/P&gt;&lt;P&gt;WRITE &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; lt+0(6).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rgds,&lt;/P&gt;&lt;P&gt;PJ&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Priyank Jain&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Oct 2005 05:36:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date-format-conversion/m-p/1083602#M98626</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-10-24T05:36:57Z</dc:date>
    </item>
    <item>
      <title>Re: Date format conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date-format-conversion/m-p/1083603#M98627</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;system keeps the dates in YYYYMMDD format (as long as the field is of type D). so you dont have to do anything special to convert. in your case you wanted YYYYMM which is bascially offsetting for which you can follow the answers given by others in the thread.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Raja&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Oct 2005 05:42:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date-format-conversion/m-p/1083603#M98627</guid>
      <dc:creator>athavanraja</dc:creator>
      <dc:date>2005-10-24T05:42:36Z</dc:date>
    </item>
    <item>
      <title>Re: Date format conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date-format-conversion/m-p/1083604#M98628</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;use can use the function modules mentioned above or use &lt;/P&gt;&lt;P&gt;the concatenate statement.&lt;/P&gt;&lt;P&gt;eg. date entered in format yyyymmdd say 20051024&lt;/P&gt;&lt;P&gt;data : w_date like sy-datum.&lt;/P&gt;&lt;P&gt;CONCATENATE w_date&lt;EM&gt;0(4) w_date&lt;/EM&gt;4(2) iNTO w_date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;kavita joshi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Oct 2005 05:55:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date-format-conversion/m-p/1083604#M98628</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-10-24T05:55:02Z</dc:date>
    </item>
  </channel>
</rss>

