MIST getClockString

From DCS World Wiki - Hoggitworld.com
Revision as of 08:56, 13 April 2018 by Grimes (talk | contribs) (Created page with "{{Mission Scripting |fName= mist.getClockString |vNum = Mist 3.7 |desc= Returns a string of the time in a clock format. time is defined in seconds, if time is not passed th...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


mist.getClockString

Added with: Mist 3.7
Description
Returns a string of the time in a clock format. time is defined in seconds, if time is not passed the function will use the current time of the mission. The boolean value format if present will return the string in a 12 Hour clock format with an AM or PM attached to the end of the string. By default the function returns the time in a 24 hour format. HH:MM:SS
Syntax
string mist.getClockString( number time ,boolean format )
Valid Input Values:
93600
Return value:
string
Return example:
02:32:50
Usage Examples:
The following will insert the current time as a clock format into a message.
local theTime = mist.getClockString()
local string = 'It appears that the A-10C Digital Clock has failed. Current Mission Time: ' .. theTime
Notes:
Related Functions
tostringMGRS, tostringLL, tostringBR, getMGRSString, getLLString, getBRString, getLeadingPos, getLeadingMGRSString, getLeadingLLString, getLeadingBRString, getMilString, getClockString, getDateString, stringMatch, stringCondense

Scripting Engine

MIST Root Page