<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Timestamps in OPC Library</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/281d579a71/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/281d579a71/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/281d579a71/</id><updated>2022-01-21T12:56:49.972000Z</updated><subtitle>Recent posts to Timestamps in OPC Library</subtitle><entry><title>Timestamps in OPC Library</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/281d579a71/?limit=25#c14d" rel="alternate"/><published>2022-01-21T12:56:49.972000Z</published><updated>2022-01-21T12:56:49.972000Z</updated><author><name>codesystart</name><uri>https://forge.codesys.com/u/jeetshah/</uri></author><id>https://forge.codesys.com02cc762d4bfd53f31b3365ad95e82bce89c0f516</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;we are trying to use the new OPC UA library example project. &lt;/p&gt;
&lt;p&gt;In this project, the timestamp which is provided by the OPC server in the LINT or OpcUa_DateTime&lt;br/&gt;
Later it is converted in to codesys datatype DT using a function DateTimeToDT. &lt;/p&gt;
&lt;p&gt;In the implementation of this fuunction some EPOCH constants (11644473600) with datatype LINT is used. This is equivalent to Sunday, January 1, 2339 12:00:00 AM. &lt;/p&gt;
&lt;p&gt;But this function only gives timestamps in seconds.&lt;/p&gt;
&lt;p&gt;the problem is we want it in milliseconds. we tried to use TO_TOD or TO_TIME. but that gives incorrect results.&lt;/p&gt;
&lt;p&gt;could somebody let me know how do we solve this problem??&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>