private void button1_Click(object sender, RoutedEventArgs e)
{
if (textBox1.Text.Length > 2)
{
string str = textBox1.Text;
string[] splitstr = str.Split(' ');
textBox1.Text = splitstr[0].ToString() + ":" + splitstr[1].ToString();
textBox1.Focus();
string asa = dateTimeBox1.SelectedDate.ToString();
string[] splitasa = asa.Split(' ');
string teste = splitasa[0].ToString()+ " " + textBox1.Text;
DateTime? asd2 = dateTimeBox1.SelectedDate;
textBox1.Text = teste;
DateTime? asd = DateTime.ParseExact(teste, "yyyy-MM-dd HH:mm", CultureInfo.InvariantCulture);
dateTimeBox1.SelectedDate = asd;
}
{
if (textBox1.Text.Length > 2)
{
string str = textBox1.Text;
string[] splitstr = str.Split(' ');
textBox1.Text = splitstr[0].ToString() + ":" + splitstr[1].ToString();
textBox1.Focus();
string asa = dateTimeBox1.SelectedDate.ToString();
string[] splitasa = asa.Split(' ');
string teste = splitasa[0].ToString()+ " " + textBox1.Text;
DateTime? asd2 = dateTimeBox1.SelectedDate;
textBox1.Text = teste;
DateTime? asd = DateTime.ParseExact(teste, "yyyy-MM-dd HH:mm", CultureInfo.InvariantCulture);
dateTimeBox1.SelectedDate = asd;
}