fn vbs timeToString (VBS2)

From Bohemia Interactive Community

Jump to: navigation, search
Editors, please check Policy: Scripting Command Page Syntax.
Introduced in Virtual Battlespace 2 version 1.19

Click on the images for descriptions

Introduced in

Game:
Virtual Battlespace 2
Version:
1.19

Description

Description:
Converts the content of a daytime variable into a text string.
No rounding of the time is done (i.e. the time is returned as per the clock.)

Syntax

Syntax:
[currtime,format] call fn_vbs_timeToString
Parameters:
currtime: Number - Either the system variable daytime, or a user-defined one, in the same format as daytime.
format: String - (optional), defines the returned time format.
Valid parameters are (case-sensitive):
• "HH" - Hour
• "HH:MM" - Hour:Minute
• "HH:MM:SS" - Hour:Minute:Seconds (default)
• "HH:MM:SS:MM" - Hour:Minute:Seconds:Milliseconds
• "ARRAY" - [Hour,Minute,Seconds,Milliseconds]
Return Value:

Examples

Example 1:
_ts=[daytime] call fn_vbs_timeToString; // "12:30:00" if daytime contains 12.5
_ts=[daytime,"HH:MM"] call fn_vbs_timeToString; // "01:06" if daytime contains 1.1

Additional Information

Multiplayer:
Behaviour unknown.
See also:
time, daytime

Notes

Notes

+ Add Note

Only post proven facts here. Use the talk page or the forums for discussions.

Notes

Bottom Section

Personal tools
Buy ArmA now!