<分区>
我正在尝试将“空”值分配给 Datetime?
对象。但它抛出 "nullable value must have a value"
异常。
//item.PlannedStartDate value is nothing.
fact_Initiative.Start_Date = If([String].IsNullOrEmpty(item.PlannedStartDate),
DBNull.Value, CType(Convert.ToDateTime(item.PlannedStartDate),
System.Nullable(Of Date)))
如何解决这个问题