<?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>Question Re: System.currentTimeMillis() and Date() in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/system-currenttimemillis-and-date/qaa-p/2165752#M942316</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,Valery&lt;/P&gt;&lt;P&gt;Thanks for your reply.I have 1 more question.&lt;/P&gt;&lt;P&gt;Why if I do the following:&lt;/P&gt;&lt;P&gt;  Date currentDate = new java.sql.Date( System.currentTimeMillis());&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;  Date currentDate = new Date();&lt;/P&gt;&lt;P&gt;and after&lt;/P&gt;&lt;P&gt;  int curMonth = currentDate.getMonth();&lt;/P&gt;&lt;P&gt;I recieve curMonth = 3 (but it is an april now)&lt;/P&gt;&lt;P&gt;But when I do the following:&lt;/P&gt;&lt;P&gt;  wdContext.currentContextElement().setMonth(curDate);&lt;/P&gt;&lt;P&gt;I see on the screen the right current date(Month of type string in the context),&lt;/P&gt;&lt;P&gt;i.e. month is april.&lt;/P&gt;&lt;P&gt;???&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Michael&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 23 Apr 2007 15:38:16 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-04-23T15:38:16Z</dc:date>
    <item>
      <title>System.currentTimeMillis() and Date()</title>
      <link>https://community.sap.com/t5/technology-q-a/system-currenttimemillis-and-date/qaq-p/2165750</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,everybody&lt;/P&gt;&lt;P&gt;What is the difference beetween System.currentTimeMillis() and Date()?&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Michael&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Apr 2007 15:11:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/system-currenttimemillis-and-date/qaq-p/2165750</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-23T15:11:16Z</dc:date>
    </item>
    <item>
      <title>Re: System.currentTimeMillis() and Date()</title>
      <link>https://community.sap.com/t5/technology-q-a/system-currenttimemillis-and-date/qaa-p/2165751#M942315</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Michael,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;System.currentTimeMillis()  -- current date represented as number of milliseconds after/before Jan 1, 1970&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;java.util.Date -- object that encapsulates date, when constructor called without arguments then it's current date. Note that almost all methods of this class are deprecated while it was designed only for Grigorian calendar. To get specific day/month/year from java.util.Date use java.util.Calendar.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Valery Silaev&lt;/P&gt;&lt;P&gt;SaM Solutions&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sam-solutions.net" target="test_blank"&gt;http://www.sam-solutions.net&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Apr 2007 15:16:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/system-currenttimemillis-and-date/qaa-p/2165751#M942315</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-23T15:16:41Z</dc:date>
    </item>
    <item>
      <title>Re: System.currentTimeMillis() and Date()</title>
      <link>https://community.sap.com/t5/technology-q-a/system-currenttimemillis-and-date/qaa-p/2165752#M942316</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,Valery&lt;/P&gt;&lt;P&gt;Thanks for your reply.I have 1 more question.&lt;/P&gt;&lt;P&gt;Why if I do the following:&lt;/P&gt;&lt;P&gt;  Date currentDate = new java.sql.Date( System.currentTimeMillis());&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;  Date currentDate = new Date();&lt;/P&gt;&lt;P&gt;and after&lt;/P&gt;&lt;P&gt;  int curMonth = currentDate.getMonth();&lt;/P&gt;&lt;P&gt;I recieve curMonth = 3 (but it is an april now)&lt;/P&gt;&lt;P&gt;But when I do the following:&lt;/P&gt;&lt;P&gt;  wdContext.currentContextElement().setMonth(curDate);&lt;/P&gt;&lt;P&gt;I see on the screen the right current date(Month of type string in the context),&lt;/P&gt;&lt;P&gt;i.e. month is april.&lt;/P&gt;&lt;P&gt;???&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Michael&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Apr 2007 15:38:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/system-currenttimemillis-and-date/qaa-p/2165752#M942316</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-23T15:38:16Z</dc:date>
    </item>
    <item>
      <title>Re: System.currentTimeMillis() and Date()</title>
      <link>https://community.sap.com/t5/technology-q-a/system-currenttimemillis-and-date/qaa-p/2165753#M942317</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Michel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At Java API,  A month is represented by an integer from 0 to 11; 0 is January, &lt;/P&gt;&lt;P&gt;1 is February, and so forth; thus 11 is December.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When this date is displayed at your web dynpro interface, this date is showed normaly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Luciano&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Apr 2007 16:38:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/system-currenttimemillis-and-date/qaa-p/2165753#M942317</guid>
      <dc:creator>luciano_leitedasilva</dc:creator>
      <dc:date>2007-04-23T16:38:39Z</dc:date>
    </item>
  </channel>
</rss>

