<?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>Convert Current time to millisecond</title><link>https://community.appian.com/discussions/f/plug-ins/35299/convert-current-time-to-millisecond</link><description>Convert current time to milliseconds. 
 Ex. 1719220373569 (5:13 pm in China) 
 
 Any idea, how we can achieve this in Appian? Any function or plugins?</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Convert Current time to millisecond</title><link>https://community.appian.com/thread/137252?ContentTypeID=1</link><pubDate>Wed, 26 Jun 2024 07:06:37 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d0cdb94e-2207-46f0-b2d8-4b1e1db66164</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;There is a plugin providing that function.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;a href="https://community.appian.com/b/appmarket/posts/date-and-time-utilities"&gt;Date and Time Utilities&lt;/a&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Convert Current time to millisecond</title><link>https://community.appian.com/thread/137244?ContentTypeID=1</link><pubDate>Wed, 26 Jun 2024 05:00:01 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d36f89fa-bd93-4b7a-8132-91d301e3eafb</guid><dc:creator>rahulb1099</dc:creator><description>&lt;p&gt;Thanks  , yes it works.&lt;/p&gt;
&lt;p&gt;I used below code.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;  localvariables(
  local!unixEpoch : fn!datetime(1970, 1, 1, 0,0,0,0),
  local!intervalDiff: now() - local!unixEpoch,
  local!stringintervalDiff: fn!tostring(local!intervalDiff),
  local!days: fn!tointeger(local!intervalDiff),
  local!stringPartExcludingDays: fn!split(local!stringintervalDiff, &amp;quot;::&amp;quot;)[2],
  local!splitPartExcludingDays: fn!split(local!stringPartExcludingDays, &amp;quot;:&amp;quot;),
  local!hours: fn!tointeger(local!splitPartExcludingDays[1]),
  local!minutes: fn!tointeger(local!splitPartExcludingDays[2]),
  local!seconds: fn!tointeger(local!splitPartExcludingDays[3]),
  local!milliseconds: right(local!splitPartExcludingDays[3], 3),
  fixed(
    (local!days * 24 * 3600) + (local!hours * 3600) + (local!minutes * 60) + local!seconds,
    0,
    true
  ) &amp;amp; local!milliseconds
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Convert Current time to millisecond</title><link>https://community.appian.com/thread/137189?ContentTypeID=1</link><pubDate>Mon, 24 Jun 2024 17:29:29 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:f1cea74d-8758-44e2-91a2-c00e8fa024b9</guid><dc:creator>Konduru Chaitanya</dc:creator><description>&lt;p&gt;Hello&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This would be epoch time conversion. Below is a calculation which would work perfectly given your timezone is set to HKT.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt; tointeger(
   (
     todatetime(ri!dateTime) - todatetime(&amp;quot;01/01/1970&amp;quot;)
   ) * 24 * 60 * 60
 )&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>