I would like to use the following in my linq query:
name_9 = data.Field<String>("Line Description") == "Care" ? "" : data.Field<DateTime>("End Date")
However, when I try to, I get the following error;
Error 1 Type of conditional expression cannot be determined because
there is no implicit conversion between ‘string’ and ‘System.DateTime’
Is there a way to overcome this?
The end-date is a datetime, not a string; a simple approach might be: