# Convert Time To Text

Grammar — Text(seconds seconds) using format format
FlagsNative | Function

Convert a time value, in seconds, to text using one of various formats

# Arguments

  • text — Format
  • int — Seconds

Returns — text

native text TextTimeFormat(text inFormat, int inSecs);

Category: String / Formatting

# Examples

# campaigns/liberty.sc2campaign

MapScript.galaxy

// L165
TextTimeFormat(StringToText("<min2/>:<sec2/>"), lp_score)
// L170
TextTimeFormat(StringToText("<min2/>:<sec2/>"), 0)
// L471
TextTimeFormat(StringToText("<mintotal/>:<sec2/>"), gv_finalScore)
// L1317
TextTimeFormat(StringToText("<min2/>:<sec2/>"), gv_finalScore)
// L1323
TextTimeFormat(StringToText("<min2/>:<sec2/>"), gv_previousScore)
// L1334
TextTimeFormat(StringToText("<min2/>:<sec2/>"), gv_finalScore)
// L165
TextTimeFormat(StringToText("<min2/>:<sec2/>"), lp_score)
// L170
TextTimeFormat(StringToText("<min2/>:<sec2/>"), 0)
// L471
TextTimeFormat(StringToText("<mintotal/>:<sec2/>"), gv_finalScore)
// L1317
TextTimeFormat(StringToText("<min2/>:<sec2/>"), gv_finalScore)
// L1323
TextTimeFormat(StringToText("<min2/>:<sec2/>"), gv_previousScore)
// L1334
TextTimeFormat(StringToText("<min2/>:<sec2/>"), gv_finalScore)
// L5072
TextTimeFormat(StringToText("<mintotal/>:<sec2/>"), FixedToInt(TimerGetRemaining(gv_s3EscapeTimer)))
// L5084
TextTimeFormat(StringToText("<mintotal/>:<sec2/>"), FixedToInt(TimerGetRemaining(gv_s3EscapeTimer)))
// L2376
TextTimeFormat(StringToText("<sectotal/>"), FixedToInt(lv_timetoTarget))
// L436
TextTimeFormat(StringToText("<sectotal/>"), FixedToInt(lp_channelTimeRemaining))
// L10376
TextTimeFormat(StringToText("<mintotal/>:<sec2/>"), FixedToInt(gv_lowestLockDownTime))
// L6872
TextTimeFormat(StringToText("<mintotal/>:<sec2/>"), FixedToInt(TimerGetElapsed(gv_achievementPrisonDeckTimedRunTimer)))
// L2872
TextTimeFormat(StringToText("<mintotal/>:<sec2/>"), FixedToInt(UnitAbilityGetCooldown(gv_chrysalis, "PrimalSpawning", "Abil/PrimalSpawning")))
// L4625
TextTimeFormat(StringToText("<mintotal/>:<sec2/>"), FixedToInt(gv_victoryStatTyrannozorLifeTimer))
// L9037
TextTimeFormat(StringToText("<mintotal/>:<sec2/>"), FixedToInt(TimerGetElapsed(gv_yagdraTimer)))
// L9038
TextTimeFormat(StringToText("<mintotal/>:<sec2/>"), FixedToInt(TimerGetElapsed(gv_kraithTimer)))
// L9039
TextTimeFormat(StringToText("<mintotal/>:<sec2/>"), FixedToInt(TimerGetElapsed(gv_slivanTimer)))
// L9040
TextTimeFormat(StringToText("<mintotal/>:<sec2/>"), FixedToInt(TimerGetElapsed(gv_zurvanTimer)))
// L2376
TextTimeFormat(StringToText("<sectotal/>"), FixedToInt(lv_timetoTarget))
// L436
TextTimeFormat(StringToText("<sectotal/>"), FixedToInt(lp_channelTimeRemaining))
// L10376
TextTimeFormat(StringToText("<mintotal/>:<sec2/>"), FixedToInt(gv_lowestLockDownTime))
// L6872
TextTimeFormat(StringToText("<mintotal/>:<sec2/>"), FixedToInt(TimerGetElapsed(gv_achievementPrisonDeckTimedRunTimer)))
// L2872
TextTimeFormat(StringToText("<mintotal/>:<sec2/>"), FixedToInt(UnitAbilityGetCooldown(gv_chrysalis, "PrimalSpawning", "Abil/PrimalSpawning")))
// L4625
TextTimeFormat(StringToText("<mintotal/>:<sec2/>"), FixedToInt(gv_victoryStatTyrannozorLifeTimer))
// L9037
TextTimeFormat(StringToText("<mintotal/>:<sec2/>"), FixedToInt(TimerGetElapsed(gv_yagdraTimer)))
// L9038
TextTimeFormat(StringToText("<mintotal/>:<sec2/>"), FixedToInt(TimerGetElapsed(gv_kraithTimer)))
// L9039
TextTimeFormat(StringToText("<mintotal/>:<sec2/>"), FixedToInt(TimerGetElapsed(gv_slivanTimer)))
// L9040
TextTimeFormat(StringToText("<mintotal/>:<sec2/>"), FixedToInt(TimerGetElapsed(gv_zurvanTimer)))
// L5072
TextTimeFormat(StringToText("<mintotal/>:<sec2/>"), FixedToInt(TimerGetRemaining(gv_s3EscapeTimer)))
// L5084
TextTimeFormat(StringToText("<mintotal/>:<sec2/>"), FixedToInt(TimerGetRemaining(gv_s3EscapeTimer)))

# campaigns/swarmstory.sc2campaign

SwarmCampaignLib.galaxy

// L462
TextTimeFormat(StringExternal("Param/Value/lib_SwaC_2015A005"), lp_second)
// L465
TextTimeFormat(StringExternal("Param/Value/lib_SwaC_BB62DA99"), lp_second)

# campaigns/void.sc2campaign

MapScript.galaxy

// L4194
TextTimeFormat(StringToText("<mintotal/>:<sec2/>"), FixedToInt(gv_lowestTimeToImpact))
// L4194
TextTimeFormat(StringToText("<mintotal/>:<sec2/>"), FixedToInt(gv_lowestTimeToImpact))

# campaigns/voidstory.sc2campaign

VoidCampaignLib.galaxy

// L8509
TextTimeFormat(StringExternal("Param/Value/lib_VoiC_A4F1A203"), lp_second)
// L8512
TextTimeFormat(StringExternal("Param/Value/lib_VoiC_4E67BE7A"), lp_second)

# campaigns/voidstory.sc2campaign

VoidCampaignUILib.galaxy

// L4517
TextTimeFormat(StringToText("<sectotal/>"), DataTableGetInt(true, libVCUI_gf_PU_ProgressBarUnit_DataNameOld(lp_unit, libVCUI_ge_PU_ProgressBarUnitStoredValuesOld_CurValue)))
// L4774
TextTimeFormat(StringToText("<mintotal/>:<sec2/>"), lv_curValue)

# mods/heroesbrawlmods/arenamodemods/punisherarena.stormmod

LibAMPU.galaxy

// L2246
TextTimeFormat(StringToText("<mintotal/>:<sec2/>"), FixedToInt(TimerGetRemaining(lv_spawnTimer)))
// L2309
TextTimeFormat(StringToText("<mintotal/>:<sec2/>"), FixedToInt(TimerGetRemaining(lv_respawnTimer)))

# mods/heroesbrawlmods/arenamodemods/trialgrounds.stormmod

LibAMVS.galaxy

// L601
TextTimeFormat(StringToText("<sectotal/>"), FixedToInt(TimerGetRemaining(lp_timer)))

# mods/heroesbrawlmods/brawlmapmods/blackheartsrevenge.stormmod

LibMDoE.galaxy

// L848
TextTimeFormat(StringToText("<sectotal/>"), FixedToInt(TimerGetDuration(lv_cannonActivationWarningTimer)))
// L850
TextTimeFormat(StringToText("<sectotal/>"), FixedToInt(TimerGetDuration(lv_cannonActivationWarningTimer)))
// L857
TextTimeFormat(StringToText("<sectotal/>"), FixedToInt(TimerGetRemaining(lv_cannonActivationWarningTimer)))
// L859
TextTimeFormat(StringToText("<sectotal/>"), FixedToInt(TimerGetRemaining(lv_cannonActivationWarningTimer)))
// L1453
TextTimeFormat(StringToText("<min2/>:<sec2/>"), lp_progressUnit)
// L1459
TextTimeFormat(StringToText("<min2/>:<sec2/>"), lp_progressUnit)

# mods/heroesbrawlmods/brawlmapmods/coop/deadmansstand.stormmod

LibPEB1.galaxy

// L3990
TextTimeFormat(StringToText("<min2/>:<sec2/>"), FixedToInt(TimerGetRemaining(libPEB1_gv_creepCamps[lp_campIndex].lv_respawnTimer)))
// L3994
TextTimeFormat(StringToText("<min2/>:<sec2/>"), FixedToInt(TimerGetRemaining(libPEB1_gv_creepCamps[lp_campIndex].lv_respawnTimer)))
// L4212
TextTimeFormat(StringToText("<mintotal/>:<sec2/>"), FixedToInt(TimerGetRemaining(lp_timerPanelTimer)))
// L4358
TextTimeFormat(StringToText("<mintotal/>:<sec2/>"), FixedToInt(TimerGetRemaining(lp_timerPanelTimer)))
// L12036
TextTimeFormat(StringToText("<hour2/>:<min2/>:<sec2/>"), libPEB1_gv_victoryTime)
// L12164
TextTimeFormat(StringToText("<hour2/>:<min2/>:<sec2/>"), FixedToInt(lv_time))
// L2358
TextTimeFormat(StringToText("<mintotal/>:<sec2/>"), FixedToInt(TimerGetRemaining(lp_timerPanelTimer)))
// L11201
TextTimeFormat(StringToText("<hour2/>:<min2/>:<sec2/>"), libPEB1_gv_victoryTime)
// L11290
TextTimeFormat(StringToText("<mintotal/>:<sec2/>"), FixedToInt(libPEB1_gv_goldTime_C))
// L11293
TextTimeFormat(StringToText("<mintotal/>:<sec2/>"), FixedToInt((libPEB1_gv_silverTime_C - libPEB1_gv_goldTime_C)))
// L11330
TextTimeFormat(StringToText("<mintotal/>:<sec2/>"), CeilingI((libPEB1_gv_goldTime_C - TimerGetElapsed(libGame_gv_gameTimer))))
// L11335
TextTimeFormat(StringToText("<mintotal/>:<sec2/>"), 0)
// L11339
TextTimeFormat(StringToText("<mintotal/>:<sec2/>"), FixedToInt((libPEB1_gv_silverTime_C - libPEB1_gv_goldTime_C)))
// L11344
TextTimeFormat(StringToText("<mintotal/>:<sec2/>"), CeilingI((libPEB1_gv_silverTime_C - TimerGetElapsed(libGame_gv_gameTimer))))
// L11348
TextTimeFormat(StringToText("<mintotal/>:<sec2/>"), 0)
// L11377
TextTimeFormat(StringToText("<min2/>:<sec2/>"), FixedToInt(TimerGetElapsed(libGame_gv_gameTimer)))

# mods/heroesbrawlmods/brawlmapmods/coop/pvebrawluimod.stormmod

LibPBUI.galaxy

// L448
TextTimeFormat(StringToText("<sectotal/>"), FixedToInt(TimerGetRemaining(libPBUI_gv_curateHeroSelectionSetting.lv_countdownTimer)))

# mods/heroesbrawlmods/brawlmapmods/coop/pvemod.stormmod

LibPVEU.galaxy

// L471
TextTimeFormat(StringToText("<sectotal/>"), FixedToInt(TimerGetRemaining(libPVEU_gv_pvEUICurateHeroSelectionSetting.lv_countdownTimer)))
// L2159
TextTimeFormat(StringToText("<min2/>:<sec2/>"), FixedToInt(lv_time))

# mods/heroesbrawlmods/brawlmapmods/hanamurapayloadpush.stormmod

LibMHPP.galaxy

// L1415
TextTimeFormat(StringToText("<min2/>:<sec2/>"), FixedToInt(TimerGetRemaining(libGame_gv_openTheGatesTimer)))
// L1418
TextTimeFormat(StringToText("<min2/>:<sec2/>"), FixedToInt(TimerGetRemaining(libMHPP_gv_mHPP_DefenseTimeToWinTimer)))
// L1460
TextTimeFormat(StringToText("<min2/>:<sec2/>"), FixedToInt(TimerGetRemaining(libMHPP_gv_mHPP_DefenseTimeToWinTimer)))
// L1989
TextTimeFormat(StringToText("<mintotal/>:<sec2/>"), FixedToInt(libMHPP_gv_mHPP_CheckPointReachedBonusTime_C))

# mods/heroesbrawlmods/brawlmapmods/lunarfestival.stormmod

LibLNYF.galaxy

// L1736
TextTimeFormat(StringToText("<min2/>:<sec2/>"), 0)
// L1737
TextTimeFormat(StringToText("<min2/>:<sec2/>"), 0)
// L1882
TextTimeFormat(StringToText("<min2/>:<sec2/>"), FixedToInt(TimerGetElapsed(libGame_gv_gameTimer)))
// L1883
TextTimeFormat(StringToText("<min2/>:<sec2/>"), FixedToInt(TimerGetElapsed(libGame_gv_gameTimer)))

# mods/heroesbrawlmods/brawlmapmods/onelane/onelanemapshared.stormmod

LibOLMS.galaxy

// L50
TextTimeFormat(StringToText("<min2/>:<sec2/>"), FixedToInt(UnitBehaviorDuration(lp_unit, "GenerateRegenGlobe")))
// L53
TextTimeFormat(StringToText("<min2/>:<sec2/>"), FixedToInt(UnitBehaviorDuration(lp_unit, "GenerateRegenGlobe")))

# mods/heroesdata.stormmod

GameLib.galaxy

// L11225
TextTimeFormat(StringToText("<min2/>:<sec2/>"), FixedToInt(TimerGetElapsed(libGame_gv_gameTimer)))

# mods/heroesdata.stormmod

MapMechanicsLib.galaxy

// L1067
TextTimeFormat(StringToText("<mintotal/>:<sec2/>"), FixedToInt(TimerGetRemaining(libMapM_gv_jungleCreepCamps[lp_camp].lv_stateCreepRespawnTimer)))
// L1070
TextTimeFormat(StringToText("<mintotal/>:<sec2/>"), FixedToInt(TimerGetRemaining(libMapM_gv_jungleCreepCamps[lp_camp].lv_stateCreepRespawnTimer)))

# mods/heroesdata.stormmod

SupportLib.galaxy

// L455
TextTimeFormat(StringToText("<min2/>:<sec2/>"), FixedToInt(libSprt_gv_statTrackingStartTime[lp_reportPlayer]))
// L456
TextTimeFormat(StringToText("<min2/>:<sec2/>"), FixedToInt(TimerGetElapsed(libGame_gv_gameTimer)))
// L8079
TextTimeFormat(StringToText("<min2/>:<sec2/>"), FixedToInt(TimerGetElapsed(libGame_gv_gameTimer)))
// L8101
TextTimeFormat(StringToText("<min2/>:<sec2/>"), FixedToInt((lv_newTime * 60.0)))

# mods/heroesdata.stormmod

UILib.galaxy

// L4705
TextTimeFormat(StringToText("<mintotal/>:<sec2/>"), lp_remainingSeconds)
// L4711
TextTimeFormat(StringToText("<mintotal/>:<sec2/>"), lp_remainingSeconds)
// L4750
TextTimeFormat(StringToText("<mintotal/>:<sec2/>"), lp_remainingSeconds)
// L4831
TextTimeFormat(StringToText("<mintotal/>:<sec2/>"), lp_remainingSeconds)
// L4875
TextTimeFormat(StringToText("<mintotal/>:<sec2/>"), lp_remainingSeconds)
// L5028
TextTimeFormat(StringToText("<mintotal/>:<sec2/>"), lp_remainingSeconds)
// L5159
TextTimeFormat(StringToText("<mintotal/>:<sec2/>"), lp_remainingTime)
// L5160
TextTimeFormat(StringToText("<mintotal/>:<sec2/>"), lp_remainingTime)
// L5165
TextTimeFormat(StringToText("<mintotal/>:<sec2/>"), lp_remainingTime)
// L5169
TextTimeFormat(StringToText("<mintotal/>:<sec2/>"), lp_remainingTime)

# mods/heroesmapmods/battlegroundmapmods/alteracpass.stormmod

LibMMAP.galaxy

// L1242
TextTimeFormat(StringToText("<mintotal/>:<sec2/>"), FixedToInt(TimerGetRemaining(lp_timer)))