<?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: date format using Java script in ThingWorx Developers</title>
    <link>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/date-format-using-Java-script/m-p/622375#M38267</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try this (format string syntax is explained &lt;A href="https://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html" target="_self"&gt;here&lt;/A&gt;):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;var result = dateFormat(new Date(), "MMMMM d, yyyy hh:mm a");&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note that formatting date/time on the server side is almost always a bad idea, because for doing so it uses &lt;STRONG&gt;server&lt;/STRONG&gt; time zone (typically GMT). In most cases you should rather format it in a mashup (widgets like Grid, Value Display and others support time formatting on the client side in a similar fashion, thus automatically adjusting to the &lt;STRONG&gt;user's&lt;/STRONG&gt; time zone). Few cases when you need to format date/time on the server side include sending emails, SMS, etc. -- but in this case please double-check the timezones and make sure you handle things like DST.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt;Constantine&lt;/P&gt;</description>
    <pubDate>Wed, 14 Aug 2019 07:23:24 GMT</pubDate>
    <dc:creator>Constantine</dc:creator>
    <dc:date>2019-08-14T07:23:24Z</dc:date>
    <item>
      <title>date format using Java script</title>
      <link>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/date-format-using-Java-script/m-p/622218#M38231</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I wanted to return current date and time in&amp;nbsp;&lt;STRONG&gt;&lt;SPAN class="label-text textsize-xlarge"&gt;August 13, 2019&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-family: inherit;"&gt;03:54 PM&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="font-family: inherit;"&gt;format using Java script.Could someone help me in achieving this because I am not able to find the appropriate js to achieve this format.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: inherit;"&gt;Thanks in advance,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: inherit;"&gt;Shalini V.&lt;/SPAN&gt;&lt;/P&gt;
&lt;DIV id="root_label-29-bounding-box" class="widget-bounding-box nonresponsive"&gt;
&lt;DIV id="root_label-29" class="widget-content widget-label" data-hasqtip="root_label-29" aria-describedby="qtip-root_label-29"&gt;&lt;BR /&gt;
&lt;DIV id="root_logoutButton-66-bounding-box" class="widget-bounding-box nonresponsive"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV id="root_label-30-bounding-box" class="widget-bounding-box nonresponsive"&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Tue, 13 Aug 2019 10:25:37 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/date-format-using-Java-script/m-p/622218#M38231</guid>
      <dc:creator>svisveswaraiya</dc:creator>
      <dc:date>2019-08-13T10:25:37Z</dc:date>
    </item>
    <item>
      <title>Re: date format using Java script</title>
      <link>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/date-format-using-Java-script/m-p/622223#M38235</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://www.ptcusercommunity.com/t5/user/viewprofilepage/user-id/285988"&gt;@svisveswaraiya&lt;/a&gt;&amp;nbsp; &lt;SPAN&gt;You may refer to this &lt;/SPAN&gt;&lt;A title="article" href="https://www.ptc.com/de/support/article?n=CS295536" target="_blank" rel="noopener"&gt;article &lt;/A&gt;to get more information. Hope this is helpful.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Vibhuti&lt;/P&gt;</description>
      <pubDate>Tue, 13 Aug 2019 12:29:57 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/date-format-using-Java-script/m-p/622223#M38235</guid>
      <dc:creator>vangne</dc:creator>
      <dc:date>2019-08-13T12:29:57Z</dc:date>
    </item>
    <item>
      <title>Re: date format using Java script</title>
      <link>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/date-format-using-Java-script/m-p/622375#M38267</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try this (format string syntax is explained &lt;A href="https://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html" target="_self"&gt;here&lt;/A&gt;):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;var result = dateFormat(new Date(), "MMMMM d, yyyy hh:mm a");&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note that formatting date/time on the server side is almost always a bad idea, because for doing so it uses &lt;STRONG&gt;server&lt;/STRONG&gt; time zone (typically GMT). In most cases you should rather format it in a mashup (widgets like Grid, Value Display and others support time formatting on the client side in a similar fashion, thus automatically adjusting to the &lt;STRONG&gt;user's&lt;/STRONG&gt; time zone). Few cases when you need to format date/time on the server side include sending emails, SMS, etc. -- but in this case please double-check the timezones and make sure you handle things like DST.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt;Constantine&lt;/P&gt;</description>
      <pubDate>Wed, 14 Aug 2019 07:23:24 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/date-format-using-Java-script/m-p/622375#M38267</guid>
      <dc:creator>Constantine</dc:creator>
      <dc:date>2019-08-14T07:23:24Z</dc:date>
    </item>
    <item>
      <title>Re: date format using Java script</title>
      <link>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/date-format-using-Java-script/m-p/622618#M38313</link>
      <description>&lt;P&gt;Hello svisveswaraiya,&lt;/P&gt;

&lt;P&gt;&lt;BR /&gt;
If the&amp;nbsp;responses has answered your question, please mark it as an Accepted Solution for the benefit of others who may have the same question in the future.&lt;BR /&gt;
&lt;BR /&gt;
Thank you for your contributions to the PTC Community.&lt;/P&gt;

&lt;P&gt;Abarki&lt;/P&gt;</description>
      <pubDate>Fri, 16 Aug 2019 11:25:21 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/date-format-using-Java-script/m-p/622618#M38313</guid>
      <dc:creator>abarki</dc:creator>
      <dc:date>2019-08-16T11:25:21Z</dc:date>
    </item>
  </channel>
</rss>

