<?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: milliseconds in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/milliseconds/m-p/3618069#M871579</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Davis is right, is like you are trying to convert meters to kilograms, it doesn't make any sense.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But, if you want to know the number of miliseconds in a day, that's possible, but every day has the same number of miliseconds, so still asking for a date doesn't make any sense because you are not going to evaluate it&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 26 Mar 2008 17:34:11 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-03-26T17:34:11Z</dc:date>
    <item>
      <title>milliseconds</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/milliseconds/m-p/3618066#M871576</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Abap Gurus!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a FM existing whereby can convert all date-formats into miliseconds.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;e.g&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;25.03.2008  -&amp;gt; milliseconds&lt;/P&gt;&lt;P&gt;03/25.2008  -&amp;gt; milliseconds&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;sas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Mar 2008 17:10:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/milliseconds/m-p/3618066#M871576</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-26T17:10:23Z</dc:date>
    </item>
    <item>
      <title>Re: milliseconds</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/milliseconds/m-p/3618067#M871577</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would say no because converting a date into milliseconds doesn't make any sense, logically.  The only time it would make sense is if you wanted to know how many milliseconds are in a given day but then the answer would always be the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Davis&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Mar 2008 17:22:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/milliseconds/m-p/3618067#M871577</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-26T17:22:46Z</dc:date>
    </item>
    <item>
      <title>Re: milliseconds</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/milliseconds/m-p/3618068#M871578</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Davis&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you but I dont care about whether it makes&lt;/P&gt;&lt;P&gt;a sense or not. Ijust need a suitable FM which fulfills these&lt;/P&gt;&lt;P&gt;creterias.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;sas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Mar 2008 17:30:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/milliseconds/m-p/3618068#M871578</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-26T17:30:21Z</dc:date>
    </item>
    <item>
      <title>Re: milliseconds</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/milliseconds/m-p/3618069#M871579</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Davis is right, is like you are trying to convert meters to kilograms, it doesn't make any sense.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But, if you want to know the number of miliseconds in a day, that's possible, but every day has the same number of miliseconds, so still asking for a date doesn't make any sense because you are not going to evaluate it&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Mar 2008 17:34:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/milliseconds/m-p/3618069#M871579</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-26T17:34:11Z</dc:date>
    </item>
    <item>
      <title>Re: milliseconds</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/milliseconds/m-p/3618070#M871580</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You do care.  If it isn't logical then there won't be a FM to do it.  A simple calculation will give you the number of milliseconds in any given day.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Davis&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Mar 2008 17:39:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/milliseconds/m-p/3618070#M871580</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-26T17:39:24Z</dc:date>
    </item>
    <item>
      <title>Re: milliseconds</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/milliseconds/m-p/3618071#M871581</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 think this function module may be of some help which takes a date and a time and then gives the point of time from the mentioned date to the mentioned time in terms of seconds.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So again multiply with 60 to get the time in milliseconds.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'DATE_TIME_CONVERT'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    DATE                       = sy-datum&lt;/P&gt;&lt;P&gt;    TIME                       = sy-uzeit&lt;/P&gt;&lt;P&gt; IMPORTING&lt;/P&gt;&lt;P&gt;   POINT_IN_TIME              = variable.&lt;/P&gt;&lt;P&gt; EXCEPTIONS&lt;/P&gt;&lt;P&gt;   DATE_BEFORE_REL_DATE       = 1&lt;/P&gt;&lt;P&gt;   DATE_TO_BIG                = 2&lt;/P&gt;&lt;P&gt;   OTHERS                     = 3&lt;/P&gt;&lt;P&gt;          .&lt;/P&gt;&lt;P&gt;IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt; MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;P&gt;         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the above example, i took sy-datum and sy-uzeit i.e i want to get number of seconds from the mentioned date to the mentioned time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;variable is any data type ( preferably integer or packed because we need to multiply with 60 to get in terms of milliseconds).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Mar 2008 17:44:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/milliseconds/m-p/3618071#M871581</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-26T17:44:36Z</dc:date>
    </item>
    <item>
      <title>Re: milliseconds</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/milliseconds/m-p/3618072#M871582</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;davis I am not kidding it is necessary for&lt;/P&gt;&lt;P&gt;date check. There is no other way to do it&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;sas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Mar 2008 17:46:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/milliseconds/m-p/3618072#M871582</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-26T17:46:33Z</dc:date>
    </item>
    <item>
      <title>Re: milliseconds</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/milliseconds/m-p/3618073#M871583</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ammavajjala sorry I need date not time&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Mar 2008 17:48:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/milliseconds/m-p/3618073#M871583</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-26T17:48:16Z</dc:date>
    </item>
    <item>
      <title>Re: milliseconds</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/milliseconds/m-p/3618074#M871584</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your asking for millisecond for a date.. but milliseconds from what?  Milliseconds is a function of time and to compute it you'll need a starting point.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Mar 2008 17:54:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/milliseconds/m-p/3618074#M871584</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-26T17:54:09Z</dc:date>
    </item>
    <item>
      <title>Re: milliseconds</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/milliseconds/m-p/3618075#M871585</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could you explain your requirement?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The way you are explaining doesn't make any sense and is impossible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could take the number of miliseconds from a given date starting from the beggining of the year 01.01.2008 to a ginven date and time.&lt;/P&gt;&lt;P&gt;But again, for example, every 03.01.xxxx would have the same number of miliseconds, so asking the year is only worth if you evaluate leap years or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could also calculate the number of miliseconds from the epoch (or enoch?) of the gregorian calendar, 01.01.0001 to any given date (a really big number).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the way you are putting it doesn't make too much sense&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Mar 2008 17:57:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/milliseconds/m-p/3618075#M871585</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-26T17:57:08Z</dc:date>
    </item>
    <item>
      <title>Re: milliseconds</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/milliseconds/m-p/3618076#M871586</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm not saying that it isn't necessary but I am saying that it doesn't make sense for the conversion, because it is a constant value, so there won't be an FM to do it.  If you need the amount of milliseconds for a given date then do the calculation (it won't change from day to day) and create a constant with that value.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get the feeling that you have other requirements and you just aren't articulating those requirements to us.  If all you need is the number of milliseconds in a given day then do as I said; it will be the most efficient way to do it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Davis&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Mar 2008 17:57:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/milliseconds/m-p/3618076#M871586</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-26T17:57:16Z</dc:date>
    </item>
    <item>
      <title>Re: milliseconds</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/milliseconds/m-p/3618077#M871587</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi use this...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;parameters: p_test type sy-uzeit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: test type p decimals 4,&lt;/P&gt;&lt;P&gt;      test1 type i .&lt;/P&gt;&lt;P&gt;      test = ( p_test+4(2) ) * 10.&lt;/P&gt;&lt;P&gt;      test1 = test.&lt;/P&gt;&lt;P&gt;      write:/ test1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;venkat.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Mar 2008 18:12:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/milliseconds/m-p/3618077#M871587</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-26T18:12:41Z</dc:date>
    </item>
    <item>
      <title>Re: milliseconds</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/milliseconds/m-p/3618078#M871588</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;u didnt give from date.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Mar 2008 18:17:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/milliseconds/m-p/3618078#M871588</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-26T18:17:46Z</dc:date>
    </item>
    <item>
      <title>Re: milliseconds</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/milliseconds/m-p/3618079#M871589</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is about the best you can do.. but you still need a FROM DATE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA:
  frmdt       TYPE d,
  rvsdt       TYPE d,
  mils(15)    TYPE p,
  rslt(15)    TYPE p.

START-OF-SELECTION.

  frmdt = '20080101'.

  mils = 24 * 60 * 60 * 1000.
  rslt = ( sy-datum - frmdt ) * mils.

  WRITE:/ 'Mils in a day ', mils.
  WRITE:/ 'Mils as of today ', rslt.


  rslt = rslt / mils.

  rvsdt = frmdt + rslt.
  WRITE:/ 'Reversed calc should be today''s date', rvsdt MM/DD/YYYY.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and the output..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
Mils in a day                     86,400,000     
Mils as of today                  7,344,000,000  
Reversed calc should be today's date 03/26/2008  

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Mar 2008 18:29:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/milliseconds/m-p/3618079#M871589</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-26T18:29:07Z</dc:date>
    </item>
  </channel>
</rss>

