<?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: convert Date to Timestamp in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-date-to-timestamp/m-p/2383012#M529183</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;Please use this command to convert to date time stamp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONVERT TIME STAMP tst TIME ZONE tz INTO DATE d TIME t. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also please check this FM FRE_CONVERT_DATE_TO_TIMESTMP.&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;Ferry Lianto&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 04 Jun 2007 18:27:42 GMT</pubDate>
    <dc:creator>ferry_lianto</dc:creator>
    <dc:date>2007-06-04T18:27:42Z</dc:date>
    <item>
      <title>convert Date to Timestamp</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-date-to-timestamp/m-p/2383011#M529182</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;can anyone kindly tell me how to convert system date (sy-datum) into long timestamp format (YYYYMMDDhhmmss,mmmuuun)? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if system date is today-- 06/04/2007&lt;/P&gt;&lt;P&gt;Timestamp formate 20070604000000,0000000&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is it possible? thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Jun 2007 18:24:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-date-to-timestamp/m-p/2383011#M529182</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-04T18:24:12Z</dc:date>
    </item>
    <item>
      <title>Re: convert Date to Timestamp</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-date-to-timestamp/m-p/2383012#M529183</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;Please use this command to convert to date time stamp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONVERT TIME STAMP tst TIME ZONE tz INTO DATE d TIME t. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also please check this FM FRE_CONVERT_DATE_TO_TIMESTMP.&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;Ferry Lianto&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Jun 2007 18:27:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-date-to-timestamp/m-p/2383012#M529183</guid>
      <dc:creator>ferry_lianto</dc:creator>
      <dc:date>2007-06-04T18:27:42Z</dc:date>
    </item>
    <item>
      <title>Re: convert Date to Timestamp</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-date-to-timestamp/m-p/2383013#M529184</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;YOu can make use of the ABAP statement:&lt;/P&gt;&lt;P&gt;GET TIME STAMP FIELD f. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's what the sap documentation for that field says:&lt;/P&gt;&lt;P&gt;"&lt;/P&gt;&lt;P&gt;GET TIME STAMP FIELD f. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;Returns the timestamp in short or long form. The short form contains the current date and time; the long form also contains seven decimal places for fractions of a second, making the timestamp accurate to within 100 nanoseconds. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The target field f contains the global reference time UTC (Universal Time Coordination). This corresponds to Greenwich Mean Time (GMT). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the short form of the timestamp, f must have the type P(8), and for the long form, the type P(11) DECIMALS 7. You can create data objects using the DATA ... TYPE ... statement with reference to the data elements TIMESTAMP and TIMESTAMPL respectively. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note &lt;/P&gt;&lt;P&gt;You cannot use assignment with the time zone as you can, for example, with the ABAP types DATE or TIME. Instead, there are special statements that convert the timestamp into date and time components and output them. The time component is accurate to one second. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fractions of a second are platform-dependent - with some products, the long form of the timestamp is accurate only to the millisecond. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unlike the GET TIME statement, GET TIME-STAMP does not synchronize the ABAP clock with the system time of the database server. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example&lt;/P&gt;&lt;P&gt;DATA: &lt;/P&gt;&lt;P&gt;  s_tst TYPE timestamp, &lt;/P&gt;&lt;P&gt;  l_tst TYPE timestampl, &lt;/P&gt;&lt;P&gt;  tzone TYPE timezone. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;GET TIME STAMP FIELD s_tst.         "Short form &lt;/P&gt;&lt;P&gt;GET TIME STAMP FIELD l_tst.         "Long form &lt;/P&gt;&lt;P&gt;tzone = 'UTC   '.                   "Time zone &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE: / s_tst TIME ZONE tzone, &lt;/P&gt;&lt;P&gt;       / l_tst TIME ZONE tzone. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The short form might then contain the value 19980204163520, while the long form has the value 19980204163520,1234560. &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;Ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Jun 2007 18:28:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-date-to-timestamp/m-p/2383013#M529184</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-04T18:28:32Z</dc:date>
    </item>
    <item>
      <title>Re: convert Date to Timestamp</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-date-to-timestamp/m-p/2383014#M529185</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well you could do it manually.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;


data: str type string.

concatenate sy-datum sy-uzeit ',' '0000000' into str.

write:/ str.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Jun 2007 18:29:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-date-to-timestamp/m-p/2383014#M529185</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2007-06-04T18:29:29Z</dc:date>
    </item>
    <item>
      <title>Re: convert Date to Timestamp</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-date-to-timestamp/m-p/2383015#M529186</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks a lot! it resolved my problem &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jun 2007 00:06:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-date-to-timestamp/m-p/2383015#M529186</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-05T00:06:51Z</dc:date>
    </item>
  </channel>
</rss>

