Check out example codes for "unity string format time". It will help you in understanding the concepts better.

Code Example 1

public string FormatTime( float time )
{
int minutes = (int) time / 60000 ;
int seconds = (int) time / 1000 - 60 * minutes;
int milliseconds = (int) time - minutes * 60000 - 1000 * seconds;
return string. Format("{0:00}:{1:00}:{2:000}", minutes, seconds, milliseconds );
}

Learn ReactJs, React Native from akashmittal.com