KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I'm using a method to validate textboxes. public bool ValidateDateTimeTextBoxes(params TextBox[] textBoxes) { DateTime value = DateTime.Today; //string dateFormat = "dd/mm/yyyy"; foreach (var textBox in textBoxes) { if (!DateTime.TryParse(textBox.Text, out value)) { return false; } } return true; } I want to check the format too. It requires mm/dd/yyyy , but want it to be dd/mm/yyyy
Tags (comma-separated)
Save Edits
Cancel