Topic
When loading a DateTimeOffset column into a view using a stored procedure SmartObject, the following error occurs: "The conversion of a datetimeoffset data type to a datetime data type resulted in an out-of-range value. The statement has been terminated." This occurs when the date saved in SQL has an incorrect value such as the incorrect year (i.e. 0202 vs. 2020).
Instructions
To resolve this issue, either the date can be fixed in SQL or the SmartObject linked to the table can be used to pull the data in instead. Additionally, validation can be added to the form where the data is initially saved to ensure that incorrect values do not make it into the table.
Additional Information
This is a known issue that is to be fixed in a future release of K2.