Check several date formats using DateTime.TryParse()

后端 未结 5 1990
北荒
北荒 2021-01-05 02:34

I\'m using a method to validate textboxes.

    public bool ValidateDateTimeTextBoxes(params TextBox[] textBoxes)
    {
        DateTime value = DateTime.Toda         


        
5条回答
  •  情话喂你
    2021-01-05 03:04

    DateTime.TryParseExact(textBox.Text, "dd/MM/yyyy", null, System.Globalization.DateTimeStyles.None, out outDt))
    

提交回复
热议问题