<?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 conversion using WRITE statement in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/date-conversion-using-write-statement/m-p/429958#M12176</link>
    <description>&lt;P&gt;"Thanks for your reply, but we are not using any user-specific setting or country speciifc formatting in the report."&lt;/P&gt;&lt;P&gt;Of course you do. Any WRITE statement using these date options does it - if not overridden by a conversion routine as Rich pointed out.&lt;/P&gt;</description>
    <pubDate>Mon, 03 Apr 2017 16:36:21 GMT</pubDate>
    <dc:creator>retired_member</dc:creator>
    <dc:date>2017-04-03T16:36:21Z</dc:date>
    <item>
      <title>Date conversion using WRITE statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date-conversion-using-write-statement/m-p/429953#M12171</link>
      <description>&lt;P&gt;Hi Experts, &lt;/P&gt;&lt;P&gt;In a report I need to convert date (YYYYMMDD) to another format DD/MM/YY using WRITE statement as below. For one of the record which has value 20170403 it is converting wrongly as 17/04/03. the conversion is done using as below. &lt;/P&gt;&lt;P&gt;WRITE lv_fkdat to lv_date DD/MM/YY. &lt;/P&gt;&lt;P&gt;The type of lv_date is declared as char8.  &lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/28410-date.jpg" /&gt;&lt;/P&gt;&lt;P&gt;However for other records it is working fine. If I change the value in debugger, it is working correctly. &lt;/P&gt;&lt;P&gt;Thanks and Regards, &lt;/P&gt;&lt;P&gt;Aditya&lt;/P&gt;</description>
      <pubDate>Mon, 03 Apr 2017 10:53:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date-conversion-using-write-statement/m-p/429953#M12171</guid>
      <dc:creator>kjyothiraditya</dc:creator>
      <dc:date>2017-04-03T10:53:47Z</dc:date>
    </item>
    <item>
      <title>Re: Date conversion using WRITE statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date-conversion-using-write-statement/m-p/429954#M12172</link>
      <description>&lt;P&gt;The Write statement will generally get things right (!) if the data has a domain that has a conversion exit attached to it and it's the type of lv_fkdat that you need to worry about.&lt;/P&gt;&lt;P&gt;If lv_fkdat has a dats type (sy-datum or whatever) then writing that will result in the correct format for the user.  Otherwise have a look at the date convert function modules such as CONVERT_DATE_TO_EXTERNAL.&lt;/P&gt;&lt;P&gt;Rich&lt;/P&gt;</description>
      <pubDate>Mon, 03 Apr 2017 11:52:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date-conversion-using-write-statement/m-p/429954#M12172</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2017-04-03T11:52:13Z</dc:date>
    </item>
    <item>
      <title>Re: Date conversion using WRITE statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date-conversion-using-write-statement/m-p/429955#M12173</link>
      <description>&lt;P&gt;The separators and the sequence depend on the formatting setting of the language environment that is predefined by fixed values in the user master record and can be influenced by SET COUNTRY. Is your result user dependend or is there any SET COUNTRY before WRITE TO?&lt;/P&gt;</description>
      <pubDate>Mon, 03 Apr 2017 11:52:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date-conversion-using-write-statement/m-p/429955#M12173</guid>
      <dc:creator>retired_member</dc:creator>
      <dc:date>2017-04-03T11:52:23Z</dc:date>
    </item>
    <item>
      <title>Re: Date conversion using WRITE statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date-conversion-using-write-statement/m-p/429956#M12174</link>
      <description>&lt;P&gt;Hi Horst, &lt;/P&gt;&lt;P&gt;Thanks for your reply, but we are not using any user-specific setting or country speciifc formatting in the report. &lt;/P&gt;&lt;P&gt;It happened only with this test case. However for another date, if I 
changed the value, it is considering the WRITE statement format.&lt;/P&gt;&lt;P&gt;Once again thanks for your time. &lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Aditya&lt;/P&gt;</description>
      <pubDate>Mon, 03 Apr 2017 16:32:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date-conversion-using-write-statement/m-p/429956#M12174</guid>
      <dc:creator>kjyothiraditya</dc:creator>
      <dc:date>2017-04-03T16:32:53Z</dc:date>
    </item>
    <item>
      <title>Re: Date conversion using WRITE statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date-conversion-using-write-statement/m-p/429957#M12175</link>
      <description>&lt;P&gt;Hi Richard, &lt;/P&gt;&lt;P&gt;Thanks for your answer. Does it mean that the conversion routine takes precedence over the WRITE statement ?&lt;/P&gt;&lt;P&gt;It happened only with this test case. However for another date, if I changed the value, it is considering the WRITE statement format. Request you to help me understand this ambiguity. &lt;/P&gt;&lt;P&gt;Once again thanks foryour time.&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Aditya&lt;/P&gt;</description>
      <pubDate>Mon, 03 Apr 2017 16:32:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date-conversion-using-write-statement/m-p/429957#M12175</guid>
      <dc:creator>kjyothiraditya</dc:creator>
      <dc:date>2017-04-03T16:32:59Z</dc:date>
    </item>
    <item>
      <title>Re: Date conversion using WRITE statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date-conversion-using-write-statement/m-p/429958#M12176</link>
      <description>&lt;P&gt;"Thanks for your reply, but we are not using any user-specific setting or country speciifc formatting in the report."&lt;/P&gt;&lt;P&gt;Of course you do. Any WRITE statement using these date options does it - if not overridden by a conversion routine as Rich pointed out.&lt;/P&gt;</description>
      <pubDate>Mon, 03 Apr 2017 16:36:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date-conversion-using-write-statement/m-p/429958#M12176</guid>
      <dc:creator>retired_member</dc:creator>
      <dc:date>2017-04-03T16:36:21Z</dc:date>
    </item>
    <item>
      <title>Re: Date conversion using WRITE statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date-conversion-using-write-statement/m-p/429959#M12177</link>
      <description>&lt;P&gt;I'm not sure in your program contain any Set country or be effected from user profile.&lt;/P&gt;&lt;P&gt;Why don't you try to split to  day month and year  then combine the format that your want.&lt;/P&gt;&lt;P&gt;day = lv_from_date +6(2).&lt;/P&gt;&lt;P&gt;month = lv_from_date+4(2).&lt;/P&gt;&lt;P&gt;year = lv_from_date+2(2).&lt;/P&gt;&lt;P&gt;Thank,&lt;/P&gt;</description>
      <pubDate>Tue, 04 Apr 2017 03:54:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date-conversion-using-write-statement/m-p/429959#M12177</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2017-04-04T03:54:32Z</dc:date>
    </item>
    <item>
      <title>Re: Date conversion using WRITE statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date-conversion-using-write-statement/m-p/429960#M12178</link>
      <description>&lt;P&gt;Agreed - KISS principle: if one doesn't master ABAP, just use:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;lv_date = |{ lv_fkdat+6(2) }/{ lv_fkdat+4(2) }/{ lv_fkdat+2(2) }|. " CCYYMMDD -&amp;gt; DD/MM/YY&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 04 Apr 2017 05:01:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date-conversion-using-write-statement/m-p/429960#M12178</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2017-04-04T05:01:34Z</dc:date>
    </item>
    <item>
      <title>Re: Date conversion using WRITE statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date-conversion-using-write-statement/m-p/429961#M12179</link>
      <description>&lt;P&gt;Use substring instead of +x(y)?&lt;/P&gt;</description>
      <pubDate>Tue, 04 Apr 2017 08:08:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date-conversion-using-write-statement/m-p/429961#M12179</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2017-04-04T08:08:44Z</dc:date>
    </item>
    <item>
      <title>Re: Date conversion using WRITE statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date-conversion-using-write-statement/m-p/429962#M12180</link>
      <description>&lt;P&gt;+() is obsolete ? &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Apr 2017 11:07:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date-conversion-using-write-statement/m-p/429962#M12180</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2017-04-04T11:07:17Z</dc:date>
    </item>
    <item>
      <title>Re: Date conversion using WRITE statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date-conversion-using-write-statement/m-p/429963#M12181</link>
      <description>&lt;P&gt;Substring is more obvious. I like obvious code.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Apr 2017 11:43:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date-conversion-using-write-statement/m-p/429963#M12181</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2017-04-04T11:43:45Z</dc:date>
    </item>
    <item>
      <title>Re: Date conversion using WRITE statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date-conversion-using-write-statement/m-p/429964#M12182</link>
      <description>&lt;P&gt;The Write statement uses the conversion exit if the data element is specified with the  correct domain.&lt;/P&gt;&lt;P&gt;Rich&lt;/P&gt;</description>
      <pubDate>Tue, 04 Apr 2017 12:26:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date-conversion-using-write-statement/m-p/429964#M12182</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2017-04-04T12:26:04Z</dc:date>
    </item>
    <item>
      <title>Re: Date conversion using WRITE statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date-conversion-using-write-statement/m-p/429965#M12183</link>
      <description>&lt;P&gt;I prefer a structure - move your string to the struc and then read the components,  or move your data to the components and read the string.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Apr 2017 12:27:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date-conversion-using-write-statement/m-p/429965#M12183</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2017-04-04T12:27:04Z</dc:date>
    </item>
  </channel>
</rss>

