how to select time and date in datetimepicker in c#

C#
dateTimePicker1.Format = DateTimePickerFormat.Custom;
dateTimePicker1.CustomFormat = "hh:mm:ss tt dd/MM/yyyy";
dateTimePicker1.ShowUpDown = true;
string dt = dateTimePicker1.Value.ToString("hh:mm:ss tt dd/MM/yyyy");
Source

Also in C#: