Goran Bibic

Goran Bibic

  • 479
  • 2.9k
  • 198.4k

Datetimepicker selection changed

Mar 24 2018 10:00 AM
Use this...if is column null i want to show this value in selection changed
 
  1. private DateTime emptydate = DateTime.Parse("2018-01-01 00:00:00"); 
 
 
How to setup this line for selection changed
 
  1. vrijemeodjaveDateTimePicker.Value = string.IsNullOrEmpty(vrijemeodjaveDateTimePicker.Value == emptydate) ? ((object)DBNull.Value : vrijemeodjaveDateTimePicker.Value; 
 If is value in sql is null to show this value 01-01-2018 00:00:00

Answers (4)