I am trying to set the date format of the CSV file I am reading using the FieldConverter attribute, but I get the following error:
FieldConverter attribute is not valid for this ad type. This is valid only for 'field' declarations.
Any idea why this is happening and how I can fix it?
[DelimitedRecord(",")] [IgnoreFirst(1)] public class SomeViewModel { public int account { get; set; } [FieldConverter(ConverterKind.Date, "dd-MM-yyyy")] public DateTime doc_dte { get; set; } }
source share