I'm trying to run a timer for a game. Right now its showing HH;mm:ss:millis econds. I need to format it in HH:mm:ss. How can i do this with this code?
namespace FinalProj
{
public partial class frmFinalProj : Form
{
DateTime start = DateTime.Now;
...
private void timer1_Tick(obj ect sender, EventArgs e)
{
TimeSpan timeElapsed = (DateTime.Now - start);
string formattedTime = timeElapsed.ToS tring();
label1.Text = formattedTime;
}
Thanks for the help
Matt
namespace FinalProj
{
public partial class frmFinalProj : Form
{
DateTime start = DateTime.Now;
...
private void timer1_Tick(obj ect sender, EventArgs e)
{
TimeSpan timeElapsed = (DateTime.Now - start);
string formattedTime = timeElapsed.ToS tring();
label1.Text = formattedTime;
}
Thanks for the help
Matt
Comment