<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>I have a number 1576742379172. I want to input this to get the output as Date and Time.</title><link>https://community.appian.com/discussions/f/general/18127/i-have-a-number-1576742379172-i-want-to-input-this-to-get-the-output-as-date-and-time</link><description>I have a number 1576742379172. I want to input this to get the output as Date and Time. Please help.</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: I have a number 1576742379172. I want to input this to get the output as Date and Time.</title><link>https://community.appian.com/thread/79766?ContentTypeID=1</link><pubDate>Tue, 23 Feb 2021 12:16:36 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:ad0cef34-ffd8-479b-ad45-ce07be542c4a</guid><dc:creator>Varsha Pawar</dc:creator><description>&lt;p&gt;Sorry Stewart,&lt;/p&gt;
&lt;p&gt;It was our fault while passing milliseconds, it is working.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I have a number 1576742379172. I want to input this to get the output as Date and Time.</title><link>https://community.appian.com/thread/79763?ContentTypeID=1</link><pubDate>Tue, 23 Feb 2021 08:52:19 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:0d31fe15-921d-4adf-b9a1-1c29ef414d6c</guid><dc:creator>Stewart Burchell</dc:creator><description>&lt;p&gt;Works for me:&lt;/p&gt;
&lt;p&gt;&lt;img height="140" src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/11/pastedimage1614070284906v1.png" width="448" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Are you using an Integer for the epochTime? If so you&amp;#39;ll need to make that a decimal.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I have a number 1576742379172. I want to input this to get the output as Date and Time.</title><link>https://community.appian.com/thread/79762?ContentTypeID=1</link><pubDate>Tue, 23 Feb 2021 07:41:52 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:7504b3c0-1625-41b0-acc7-353774df5584</guid><dc:creator>Varsha Pawar</dc:creator><description>&lt;p&gt;Hi Stewart,&lt;/p&gt;
&lt;p&gt;we tried same logic with value&amp;nbsp;1614060146848 but it&amp;#39;s returning infinite date time.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I have a number 1576742379172. I want to input this to get the output as Date and Time.</title><link>https://community.appian.com/thread/71314?ContentTypeID=1</link><pubDate>Wed, 08 Jan 2020 11:57:57 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:a288cec2-0eb9-4276-a7a3-efd02dbfea39</guid><dc:creator>Stewart Burchell</dc:creator><description>&lt;p&gt;You might want to &amp;#39;harden&amp;#39; the above code (as a principle we shouldn&amp;#39;t allow &amp;#39;magic numbers&amp;#39; or &amp;#39;literals&amp;#39; in code, so perhaps put the baseDate and the calculation values in constants so they can be managed separately from the code, and also makes the code readable.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I have a number 1576742379172. I want to input this to get the output as Date and Time.</title><link>https://community.appian.com/thread/71313?ContentTypeID=1</link><pubDate>Wed, 08 Jan 2020 11:51:47 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:89574702-76e1-466a-8f60-9831a8197711</guid><dc:creator>RijutaGhosh</dc:creator><description>&lt;p&gt;Thank you Stewart. Its working.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I have a number 1576742379172. I want to input this to get the output as Date and Time.</title><link>https://community.appian.com/thread/71312?ContentTypeID=1</link><pubDate>Wed, 08 Jan 2020 11:40:34 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:45b89486-38a4-44db-86c9-02b0b7b51205</guid><dc:creator>Stewart Burchell</dc:creator><description>&lt;p&gt;Ok, so I think it&amp;#39;ll something like this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  local!epochTime: ri!epochTime,
  local!baseDate: todatetime(&amp;quot;1/1/1970&amp;quot;),
  local!baseDate + (local!epochTime / (1000*60*60*24))
)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Inputting the value you provided (1576742379172) returns&amp;nbsp;12/19/2019 7:59 AM GMT+00:00 (you&amp;#39;ll have to tell me if you think that&amp;#39;s the correct datetime value)&lt;/p&gt;
&lt;p&gt;The principle here is that I&amp;#39;ve taken the value you provided, divided by 1000 (because it&amp;#39;s milliseconds) and then divided by 60 (to get minutes), then 60 again (to get hours) and then 24 (to get days) and then simply added those days to the base of 1/1/1970&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I have a number 1576742379172. I want to input this to get the output as Date and Time.</title><link>https://community.appian.com/thread/71310?ContentTypeID=1</link><pubDate>Wed, 08 Jan 2020 11:09:37 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d2830838-f65f-4fe7-aed0-78cbd9362266</guid><dc:creator>RijutaGhosh</dc:creator><description>&lt;p&gt;unix epoch time in milliseconds&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I have a number 1576742379172. I want to input this to get the output as Date and Time.</title><link>https://community.appian.com/thread/71309?ContentTypeID=1</link><pubDate>Wed, 08 Jan 2020 10:48:32 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:da98aa40-e4fc-4249-8669-210e043f90a0</guid><dc:creator>Stewart Burchell</dc:creator><description>&lt;p&gt;Can you explain what the number actually represents? For example, it could be the number of seconds since 1/1/1900 (I don&amp;#39;t think it is, a quick calculation suggests not). But without an understanding of what it represents no-one can even begin to provide any help.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>