private void dtTmPckrEndDt_CloseUp_1(object sender, EventArgs e) { if (!string.IsNullOrEmpty(dtTmPckrStartDt.Text) && !string.IsNullOrEmpty(dtTmPckrEndDt.Text)) { DateTime StartDate = DateTime.ParseExact(dtTmPckrStartDt.Text, "dd/MMM/yyyy", CultureInfo.InvariantCulture); DateTime EndDate = DateTime.ParseExact(dtTmPckrEndDt.Text, "dd/MMM/yyyy", CultureInfo.InvariantCulture); if (StartDate > EndDate) { MessageBox.Show("Start Date Must be Less than End Date "); dtTmPckrEndDt.CustomFormat = " "; } } }
DateTime StartDate = dtTmPckrStartDt.Value; DateTime EndDate = dtTmPckrEndDt.Value;
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)