<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to current time</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/1c376418ec/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/1c376418ec/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/1c376418ec/</id><updated>2020-03-31T12:46:24.973000Z</updated><subtitle>Recent posts to current time</subtitle><entry><title>current time</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/1c376418ec/?limit=25#2bdf" rel="alternate"/><published>2020-03-31T12:46:24.973000Z</published><updated>2020-03-31T12:46:24.973000Z</updated><author><name>yann</name><uri>https://forge.codesys.com/u/yann/</uri></author><id>https://forge.codesys.com0f57807ff95afb73f8f404b1fb1d78078398f6d9</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi All,&lt;/p&gt;
&lt;p&gt;Thanks for your answers.&lt;br/&gt;
I have used the TOD function in my program.&lt;/p&gt;
&lt;p&gt;BR&lt;br/&gt;
Yann&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>current time</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/1c376418ec/?limit=25#0885" rel="alternate"/><published>2020-03-26T12:36:11.731000Z</published><updated>2020-03-26T12:36:11.731000Z</updated><author><name>Chris.O</name><uri>https://forge.codesys.com/u/chris-o/</uri></author><id>https://forge.codesys.com13c122e4b1e58033364c4f4fcd348850895892bd</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;May try this&lt;/p&gt;
&lt;p&gt;SysTimeRtcHighResGet(pTimestamp:=GetTimeResult)&lt;br/&gt;
SysTimeRTc.SysTimeRtcConvertHighResToDate(pTimestamp:=GetTimeResult, pDate:=Ctrl_DateTime);&lt;/p&gt;
&lt;p&gt;Then you can use e.g&lt;br/&gt;
    Ctrl_DateTime.wHour&lt;br/&gt;
    Ctrl_DateTime.wMinute&lt;br/&gt;
    Ctrl_DateTime.wSecond&lt;br/&gt;
    Ctrl_DateTime.wMilliseconds&lt;/p&gt;
&lt;p&gt;BR&lt;/p&gt;
&lt;p&gt;Chris&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>current time</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/1c376418ec/?limit=25#c535" rel="alternate"/><published>2020-03-26T12:20:08.276000Z</published><updated>2020-03-26T12:20:08.276000Z</updated><author><name>i-campbell</name><uri>https://forge.codesys.com/u/i-campbell/</uri></author><id>https://forge.codesys.com4f2b78c3e5bde424990e41d5eaa6f1ce7aa0c96e</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hmm... Not a standard CODESYS function that one. If it returns a DATE_AND_TIME just use the TO_TOD() to convert it to a TIME_OF_DAY.&lt;br/&gt;
If not, then the function_block getDateAndTime() from the CAA DTUtil Can get you a DATE_AND_TIME, and when .xDone is true, call the TO_TOD().&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>current time</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/1c376418ec/?limit=25#202c" rel="alternate"/><published>2020-03-26T09:45:41.655000Z</published><updated>2020-03-26T09:45:41.655000Z</updated><author><name>yann</name><uri>https://forge.codesys.com/u/yann/</uri></author><id>https://forge.codesys.comde315e2507e8dc9cdbb5ac8370eee0b62ca51e6f</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi everyone,&lt;/p&gt;
&lt;p&gt;First, I used Codesys V3.5.14 with Eaton XV303 PLC.&lt;br/&gt;
I want to extract the current time of the PLC to used it in my programme.&lt;br/&gt;
Currently I already extract the date and time with the function : gettimedate().&lt;br/&gt;
But this function return the current date and time and for my programme I want only current time.&lt;/p&gt;
&lt;p&gt;Can you help? &lt;br/&gt;
Maybe it's possible to extract the time from the function gettimedate() or extract directly the current time from my PLC.&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>