DateTime dOB = ... DateTime now = DateTime.Now; if (dOB < now) { ... }
DateTime selectedDOB = Convert.ToDateTime(DatePicker.Text); string cDate = DateTime.Now.ToShortDateString(); DateTime currentDate = Convert.ToDateTime(cDate); if (selectedDOB < currentDate) { //Error message here }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)