not really precise question, but let me help a little bit:
Here is a simple example on how to parse a string like one you could have, and store it in a DateTime variable (which is probably the clean solution if you want to display it with a different format later and so on).
string text = "21:05"; (instead you retrieve the content of your text box obviously)
string format = "HH:mm";
CultureInfo fr = new CultureInfo("fr-FR");
DateTime dt = DateTime.ParseExact(text, format, fr);
[EDIT] based on Dmitry comment:
string text = "21:05";
string format = "HH:mm";
CultureInfo invariant = System.Globalization.CultureInfo.InvariantCulture;
DateTime dt;
if (DateTime.TryParseExact(text, format, invariant, DateTimeStyles.None, out dt))
{
// do your stuff
}
else
{
// handle the fact you cannot parse the datetime
}
Be careful, the cultural context may be really important depending on your case. If you want to avoid bad input from user, you should think about implementing a validation on the box content when the user is typing in it. It's a way to force him conform to the format you are expecting.
Look here for example: Implement Validation for WPF TextBoxes but you should be able to find other examples on how to do that on SO or just google it.