Unable to map date to DateOnly datatype
rasupit opened this issue · comments
Mapping to DateOnly data type is not working or at least it can be done is not so straight forward way.
My current work around as follows:
`
mapper.Map<FeedSapTivBill>("Invoice date", r => r.InvoiceDate, (s, t) => {
if (s.HeaderValue == null) return false;
((FeedSapTivBill)t).InvoiceDate = DateOnly.FromDateTime((DateTime)s.CurrentValue);
return true;
}
It will be nice if it will work outomatically
you already get Exact DateTime
you already get Exact DateTime
Yes, however I'm mapping it to DateOnly type, therefore I have to convert the value to DateOnly. In this example is from datetime