<?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: How do I obtain current simulation date and time? in FlexSim Forum</title>
    <link>https://forums.autodesk.com/t5/flexsim-forum/how-do-i-obtain-current-simulation-date-and-time/m-p/13494792#M11421</link>
    <description>&lt;P&gt;Matt - where can I find the command documentation? &lt;/P&gt;</description>
    <pubDate>Tue, 04 Sep 2018 15:31:50 GMT</pubDate>
    <dc:creator>michael_h5</dc:creator>
    <dc:date>2018-09-04T15:31:50Z</dc:date>
    <item>
      <title>How do I obtain current simulation date and time?</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-do-i-obtain-current-simulation-date-and-time/m-p/13494789#M11418</link>
      <description>&lt;P&gt;&lt;I&gt;[ FlexSim 16.1.0 ]&lt;/I&gt;&lt;/P&gt;&lt;P&gt;How do I obtain current date. Is realtime() the best way to do it?&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jun 2016 15:15:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-do-i-obtain-current-simulation-date-and-time/m-p/13494789#M11418</guid>
      <dc:creator>aditya_prakash1</dc:creator>
      <dc:date>2016-06-24T15:15:46Z</dc:date>
    </item>
    <item>
      <title>Re: How do I obtain current simulation date and time?</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-do-i-obtain-current-simulation-date-and-time/m-p/13494790#M11419</link>
      <description>&lt;P&gt;&lt;A href="http://www.flexsim.com/answerhub/commands/redirect.php?command=realtime"&gt;realtime()&lt;/A&gt; will give you the &lt;EM&gt;real&lt;/EM&gt; current date and time, from 
your computer's clock. This should closely match the time you see on your watch, your cell phone, 
or the clock on the wall. This is different than the time in your 
simulation.&lt;/P&gt;&lt;P&gt;If you are looking for the current date in your 
simulation, this is based on your chosen time unit and start date, both
 specified when starting a new model.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="921-modelunits.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1493639iCFC724D8905D3BFF/image-size/large?v=v2&amp;amp;px=999" role="button" title="921-modelunits.png" alt="921-modelunits.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;As you're running your simulation, you can obtain various date and time values for current simulation time from the tree as shown here:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="922-simtime.gif"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1493641iE129881C39452182/image-size/large?v=v2&amp;amp;px=999" role="button" title="922-simtime.gif" alt="922-simtime.gif" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jun 2016 15:18:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-do-i-obtain-current-simulation-date-and-time/m-p/13494790#M11419</guid>
      <dc:creator>Ben_WilsonADSK</dc:creator>
      <dc:date>2016-06-24T15:18:03Z</dc:date>
    </item>
    <item>
      <title>Re: How do I obtain current simulation date and time?</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-do-i-obtain-current-simulation-date-and-time/m-p/13494791#M11420</link>
      <description>&lt;P&gt;There's a new command in FlexSim 2106 called convert(). Convert allows you to convert dates and times from different formats like Excel Date Time, FlexSim Date Time and Model Time. This is especially useful when importing data from Excel that is based upon specific dates and times. &lt;/P&gt;&lt;P&gt;A couple of ways you can use the convert() command is in conjunction with the time() command and getmodelunit()&lt;/P&gt;&lt;PRE&gt;getmodelunit(CURRENT_TIME) //Returns FS_DATETIME
time() //Returns model time
convert(time(), MODEL_TIME, DATETIME_STR) //Will print out date time based upon the date/time format string, for example 8:00:00 AM Fri 24 Jun 2016&lt;/PRE&gt;&lt;P&gt;Check out the command documentation for convert() for more information.&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jun 2016 15:36:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-do-i-obtain-current-simulation-date-and-time/m-p/13494791#M11420</guid>
      <dc:creator>matt_long</dc:creator>
      <dc:date>2016-06-24T15:36:17Z</dc:date>
    </item>
    <item>
      <title>Re: How do I obtain current simulation date and time?</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-do-i-obtain-current-simulation-date-and-time/m-p/13494792#M11421</link>
      <description>&lt;P&gt;Matt - where can I find the command documentation? &lt;/P&gt;</description>
      <pubDate>Tue, 04 Sep 2018 15:31:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-do-i-obtain-current-simulation-date-and-time/m-p/13494792#M11421</guid>
      <dc:creator>michael_h5</dc:creator>
      <dc:date>2018-09-04T15:31:50Z</dc:date>
    </item>
    <item>
      <title>Re: How do I obtain current simulation date and time?</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-do-i-obtain-current-simulation-date-and-time/m-p/13494793#M11422</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://answers.flexsim.com/users/7327/michaelh5.html" nodeid="7327"&gt;@Michael&lt;/A&gt; Under the Help Tab click on "FlexScript API Reference" or the "Commands"&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="14187-pic1.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1493642i41C222EC7BB319E6/image-size/large?v=v2&amp;amp;px=999" role="button" title="14187-pic1.png" alt="14187-pic1.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Sep 2018 19:48:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-do-i-obtain-current-simulation-date-and-time/m-p/13494793#M11422</guid>
      <dc:creator>joshua_s</dc:creator>
      <dc:date>2018-09-04T19:48:38Z</dc:date>
    </item>
    <item>
      <title>Re: How do I obtain current simulation date and time?</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-do-i-obtain-current-simulation-date-and-time/m-p/13494794#M11423</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;
 &lt;P&gt;Hi &lt;A rel="user" href="https://answers.flexsim.com/users/9/benjaminwilson.html" nodeid="9"&gt;@Ben Wilson&lt;/A&gt; ! How would I convert realtime(); to DD/MM/YYYY HH:MM:SS timeformat?&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Mon, 13 Nov 2023 21:00:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-do-i-obtain-current-simulation-date-and-time/m-p/13494794#M11423</guid>
      <dc:creator>preetdesai</dc:creator>
      <dc:date>2023-11-13T21:00:03Z</dc:date>
    </item>
    <item>
      <title>Re: How do I obtain current simulation date and time?</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-do-i-obtain-current-simulation-date-and-time/m-p/13494795#M11424</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;Here's a script to print your string to the output console:&lt;/P&gt;&lt;PRE&gt;string year=realtime(12).substr(21,4);            //  2023
string datestr=realtime(11);                      //  11/13/23
string date=datestr.substr(1,6)+year;             //  11/13/2023
string realtimeString=date+" "+realtime(10);      //  11/13/2023 23:23:10
DateTime dt=DateTime(realtimeString,"%m/%d/%Y %T");
print (dt.toString("%d/%m/%Y %T"));            // 13/11/2023 23:23:10&lt;/PRE&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 13 Nov 2023 22:53:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-do-i-obtain-current-simulation-date-and-time/m-p/13494795#M11424</guid>
      <dc:creator>jason_lightfoot_adsk</dc:creator>
      <dc:date>2023-11-13T22:53:11Z</dc:date>
    </item>
    <item>
      <title>Re: How do I obtain current simulation date and time?</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-do-i-obtain-current-simulation-date-and-time/m-p/13494796#M11425</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;
 Thank you 
 &lt;A rel="user" href="https://answers.flexsim.com/users/226/jason.l.html" nodeid="226"&gt;@Jason Lightfoot&lt;/A&gt; . That worked fine!
&lt;/DIV&gt;</description>
      <pubDate>Wed, 29 Nov 2023 17:14:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-do-i-obtain-current-simulation-date-and-time/m-p/13494796#M11425</guid>
      <dc:creator>preetdesai</dc:creator>
      <dc:date>2023-11-29T17:14:26Z</dc:date>
    </item>
  </channel>
</rss>

