<?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: Sub String Problem in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/sub-string-problem/m-p/4653608#M1095019</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;move the field to a character field and tehn take the first 8 bytes for date&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 21 Oct 2008 13:48:13 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-10-21T13:48:13Z</dc:date>
    <item>
      <title>Sub String Problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sub-string-problem/m-p/4653607#M1095018</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a date field in UTC date formate in the data base table.&lt;/P&gt;&lt;P&gt;For Ex: 20.080.804.121.334,0000000&lt;/P&gt;&lt;P&gt;            YY YY MM DD&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to compare this date with current system date (Ex 20080804)in the report and want to pull the data from table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please help me out on this??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sekhar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Oct 2008 13:44:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sub-string-problem/m-p/4653607#M1095018</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-21T13:44:18Z</dc:date>
    </item>
    <item>
      <title>Re: Sub String Problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sub-string-problem/m-p/4653608#M1095019</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;move the field to a character field and tehn take the first 8 bytes for date&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Oct 2008 13:48:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sub-string-problem/m-p/4653608#M1095019</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-21T13:48:13Z</dc:date>
    </item>
    <item>
      <title>Re: Sub String Problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sub-string-problem/m-p/4653609#M1095020</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;move first 10 characters into one variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;we can replace '.' with space using Replace all occurence of statement.&lt;/P&gt;&lt;P&gt; we can use condense statement to condense the variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now we can compare two dates.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Suresh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Oct 2008 13:58:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sub-string-problem/m-p/4653609#M1095020</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-21T13:58:42Z</dc:date>
    </item>
    <item>
      <title>Re: Sub String Problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sub-string-problem/m-p/4653610#M1095021</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Instead of converting the stored UTC timestamp to normal date before selecting the data, you can fill the range for the required UTC timestamp and select the data based on that range.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA: r_utc type range of timestampl,
      l_r_utc like line of r_utc.

DATA: time_stamp TYPE timestampl,
      dat TYPE d,
      tim TYPE t,
      tz   TYPE ttzz-tzone,
      dst(1) TYPE c.

tz = 'CST'.
dat = sy-datum.
tim = '000000'.
CONVERT DATE dat TIME tim
        INTO TIME STAMP l_r_utc-low TIME ZONE tz.

tim = '235959'.
CONVERT DATE dat TIME tim
        INTO TIME STAMP l_r_utc-high TIME ZONE tz.

l_r_utc-sign = 'I'.
l_r_utc-option = 'BT'.
append l_r_utc to r_utc.

SELECT * FROM DBTAB
INTO TABLE ITAB
WHERE UTC_TIME IN R_UTC.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once you get your data into table, you can use the CONVERT TIME STAMP to get the date and time.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
CONVERT TIME STAMP time_stamp TIME ZONE tz
        INTO DATE dat TIME tim DAYLIGHT SAVING TIME dst.
WRITE: /(10) dat, (8) tim, dst.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Naimesh Patel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Oct 2008 14:00:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sub-string-problem/m-p/4653610#M1095021</guid>
      <dc:creator>naimesh_patel</dc:creator>
      <dc:date>2008-10-21T14:00:03Z</dc:date>
    </item>
  </channel>
</rss>

