<?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: Time Stamp Conversion in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/time-stamp-conversion/m-p/3894237#M934905</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 the methods in the class cl_abap_tstmp&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Shruthi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 27 May 2008 04:06:41 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-05-27T04:06:41Z</dc:date>
    <item>
      <title>Time Stamp Conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/time-stamp-conversion/m-p/3894233#M934901</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;      I need to convert the following time stamp into date and time. could any one help me how to do this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Input format:&lt;/P&gt;&lt;P&gt;2008-05-19T01:00:00Z&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Convert statement wont work as it has characters in it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At present i have converted by using split statment. is there any other way of doing it ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Niyaz&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 May 2008 02:56:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/time-stamp-conversion/m-p/3894233#M934901</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-27T02:56:30Z</dc:date>
    </item>
    <item>
      <title>Re: Time Stamp Conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/time-stamp-conversion/m-p/3894234#M934902</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Niyaz,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try this...&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;  DATA:
        lv_timestamp TYPE string VALUE '2008-05-19T01:00:00Z',
        lv_datum TYPE datum,
        lv_time TYPE uzeit.

  lv_datum(4) = lv_timestamp(4).
  lv_datum+4(2) = lv_timestamp+5(2).
  lv_datum+6(2) = lv_timestamp+8(2).

  lv_time(2) = lv_timestamp+11(2).
  lv_time+2(2) = lv_timestamp+14(2).
  lv_time+4(2) = lv_timestamp+17(2).
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Graham Robbo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 May 2008 03:21:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/time-stamp-conversion/m-p/3894234#M934902</guid>
      <dc:creator>GrahamRobbo</dc:creator>
      <dc:date>2008-05-27T03:21:49Z</dc:date>
    </item>
    <item>
      <title>Re: Time Stamp Conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/time-stamp-conversion/m-p/3894235#M934903</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;The  FM &lt;STRONG&gt;ABI_TIMESTAMP_CONVERT_FROM&lt;/STRONG&gt; converts timestamp into date and time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sriram&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 May 2008 03:26:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/time-stamp-conversion/m-p/3894235#M934903</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-27T03:26:53Z</dc:date>
    </item>
    <item>
      <title>Re: Time Stamp Conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/time-stamp-conversion/m-p/3894236#M934904</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;As in above post u use the FM to get your output. Check the below code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data : a type string,
       time_stamp type TZONREF-TSTAMPS,
       date type SY-DATLO,
       time type SY-TIMLO.
a = '2008-05-19T01:00:00Z'.
REPLACE ALL occurrences of '-' in a with space.
REPLACE ALL occurrences of ':' in a with space.
REPLACE ALL occurrences of 'T' in a with space.
REPLACE ALL occurrences of 'Z' in a with space.

time_stamp = a.
CALL FUNCTION 'ABI_TIMESTAMP_CONVERT_FROM'
  EXPORTING
    iv_timestamp           = time_stamp
 IMPORTING
   O_DATE                 = date
   O_TIME                 = time
 EXCEPTIONS
   CONVERSION_ERROR       = 1
   OTHERS                 = 2
          .
IF sy-subrc &amp;lt;&amp;gt; 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.


write : date, time.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Raghu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 May 2008 04:00:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/time-stamp-conversion/m-p/3894236#M934904</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-27T04:00:12Z</dc:date>
    </item>
    <item>
      <title>Re: Time Stamp Conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/time-stamp-conversion/m-p/3894237#M934905</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 the methods in the class cl_abap_tstmp&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Shruthi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 May 2008 04:06:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/time-stamp-conversion/m-p/3894237#M934905</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-27T04:06:41Z</dc:date>
    </item>
    <item>
      <title>Re: Time Stamp Conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/time-stamp-conversion/m-p/3894238#M934906</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it just occured to me that this would work as well.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;  DATA:
        lv_timestamp TYPE string VALUE '2008-05-19T01:00:00Z',
        lv_datum     TYPE datum,
        lv_time      TYPE uzeit,
        lv_tstamp     TYPE tzntstmps.


  REPLACE ALL OCCURRENCES OF '-' IN lv_timestamp WITH ''.
  REPLACE ALL OCCURRENCES OF 'T' IN lv_timestamp WITH ''.
  REPLACE ALL OCCURRENCES OF ':' IN lv_timestamp WITH ''.
  REPLACE ALL OCCURRENCES OF 'Z' IN lv_timestamp WITH ''.

  MOVE lv_timestamp TO lv_tstamp.
  CONVERT TIME STAMP lv_tstamp TIME ZONE 'GMT   ' "Use sy-zonlo to convert to local timezone
   INTO DATE lv_datum TIME lv_time.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Graham Robbo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 May 2008 04:07:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/time-stamp-conversion/m-p/3894238#M934906</guid>
      <dc:creator>GrahamRobbo</dc:creator>
      <dc:date>2008-05-27T04:07:41Z</dc:date>
    </item>
  </channel>
</rss>

