After put inside this code
- // don't convert it to datetime (as you said, it may be null)
- var stringValue = (prijava_radnikaDataGridView.SelectedRows[0].Cells["dataGridViewTextBoxColumn3"].Value);
- var dateValue = string.IsNullOrEmpty(Convert.ToString(stringValue)) ? DateTime.MinValue : Convert.ToDateTime("2018-01-01 00:00:00");
- // now, datevalue is the new value for datepicker
- if (string.IsNullOrEmpty(Convert.ToString(stringValue))) vrijemeodjaveDateTimePicker.Value = dateValue;
I have error
- Activated Event Time Duration Thread
- Exception thrown: 'System.ArgumentOutOfRangeException' in System.Windows.Forms.dll ("Value of '1.1.0001. 00:00:00' is not valid for 'Value'. 'Value' should be between 'MinDate' and 'MaxDate'.") 14.33s [17640]
Nitin SontakkePosted Mar 24, 2018, 10:51 PM
Goran BibicPosted Mar 27, 2018, 3:05 AM
Ruchi SharavatPosted Mar 27, 2018, 3:03 AM
Goran BibicPosted Mar 25, 2018, 2:44 AM