<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://wiki.visionaire-tracker.net/index.php?action=history&amp;feed=atom&amp;title=SecondsToMinutes_%28CMS%29</id>
		<title>SecondsToMinutes (CMS) - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://wiki.visionaire-tracker.net/index.php?action=history&amp;feed=atom&amp;title=SecondsToMinutes_%28CMS%29"/>
		<link rel="alternate" type="text/html" href="https://wiki.visionaire-tracker.net/index.php?title=SecondsToMinutes_(CMS)&amp;action=history"/>
		<updated>2026-05-11T05:23:55Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>https://wiki.visionaire-tracker.net/index.php?title=SecondsToMinutes_(CMS)&amp;diff=4607&amp;oldid=prev</id>
		<title>AFRLme: Created page with &quot;{| class=&quot;ts&quot; style=&quot;width:100%&quot; |- ! style=&quot;text-align:left&quot; | Name !! style=&quot;text-align:left&quot; | Type !! style=&quot;text-align:left&quot; | By |- | secondsToMinutes(v) || Definition |...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.visionaire-tracker.net/index.php?title=SecondsToMinutes_(CMS)&amp;diff=4607&amp;oldid=prev"/>
				<updated>2015-02-22T13:45:32Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;{| class=&amp;quot;ts&amp;quot; style=&amp;quot;width:100%&amp;quot; |- ! style=&amp;quot;text-align:left&amp;quot; | Name !! style=&amp;quot;text-align:left&amp;quot; | Type !! style=&amp;quot;text-align:left&amp;quot; | By |- | secondsToMinutes(v) || Definition |...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{| class=&amp;quot;ts&amp;quot; style=&amp;quot;width:100%&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;text-align:left&amp;quot; | Name !! style=&amp;quot;text-align:left&amp;quot; | Type !! style=&amp;quot;text-align:left&amp;quot; | By&lt;br /&gt;
|-&lt;br /&gt;
| secondsToMinutes(v) || Definition || AFRLme&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This small function allows you to quickly convert seconds into the mm time format.&lt;br /&gt;
{| class=&amp;quot;ts&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| ''d = day, h = hour, m = minute, s = seconds.''&lt;br /&gt;
|-&lt;br /&gt;
| ''There are 86400 seconds in a day, 3600 seconds in an hour &amp;amp; 60 seconds in a minute.''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Instructions ==&lt;br /&gt;
1. Add the [[#Main_Script|main script]] to the Visionaire Studio Script Editor &amp;amp; set the script as a definition script.&amp;lt;br/&amp;gt;&lt;br /&gt;
2a. To use this function, create an ''execute a script'' containing...&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
secondsToMinutes(86400) -- will return (00) 0 minutes, because it's bang on 24 hours; the key word being '''hour'''.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
2b. Here is an example of how you could use this function...&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
Values[&amp;quot;minutes&amp;quot;].String = secondsToMinutes(Values[&amp;quot;play_time&amp;quot;].ValueInt) -- here we are converting the integer value stored in the integer field of the value into a string time format which can be returned in a displayed text action part using the &amp;lt;vs=value_name&amp;gt; field.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Main Script ==&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
function secondsToMinutes(v)&lt;br /&gt;
 v = math.floor(v % 3600 / 60)&lt;br /&gt;
 -- + --&lt;br /&gt;
 if v &amp;lt; 10 then v = tostring(&amp;quot;0&amp;quot; .. v) end&lt;br /&gt;
 -- + --&lt;br /&gt;
 return tostring( v )&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Syntax Breakdown ==&lt;br /&gt;
{| class=&amp;quot;ts&amp;quot; style=&amp;quot;width:100%&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;text-align:left&amp;quot; | Name !! style=&amp;quot;text-align:left&amp;quot; | Type !! style=&amp;quot;text-align:left;width:80%&amp;quot; | Description&lt;br /&gt;
|-&lt;br /&gt;
| v || integer || This should be an integer (number) value of the amount of seconds you want to split into the mm time format.&lt;br /&gt;
|}{{toc}}&lt;/div&gt;</summary>
		<author><name>AFRLme</name></author>	</entry>

	</feed>