1
Answer

How to convert Object type to DataTime?

Atheeq Pasha N A

Atheeq Pasha N A

16y
4.4k
1

Hi,

Could you please let me know how to convert object type to DataTime type. You can refer the below code for more information

internal object Value
{
 set
 {
  DateTime dt = Convert.ToDateTime(value);
  this.SelectedDate = (dt == DateTime.MinValue)?null:dt.ToString("dd-MMM-yyyy");
 }
}

value being passed to Value property is "19/12/2008 00:00:00".

Regards,
Atheeq

Answers (1)