I've got a SQL Server user defined table with a date
field. I represent that locally using a DateOnly
. I represent the rows locally using SqlDataRecord
. But it doesn't appear to support DateOnly
. Is there a sensible way of using SqlDataRecord
to upload date
fields?
Asked
Active
Viewed 85 times
0

Julian Birch
- 2,605
- 1
- 21
- 36
-
1Yes -- by using `DateTime` (but setting the `SqlDbType` to `SqlDbType.Date`). `SqlDataRecord` predates `DateOnly` (all of ADO.NET does, for that matter). – Jeroen Mostert Feb 22 '23 at 17:51
-
"Doesn't appear to support" is another way of saying "I can't find an API" – Julian Birch Feb 22 '23 at 18:21