Does anyone have any idea why am I seeing this error? same query works on other part of project, here when date is passed through variable also it is throwing error and even when Null values are passed shows the same. Can anyone help please?
Is the data source you are working with in the other part of the project different from the one you are having issues with?
Usually this happens if:
the underlying datetime column in the database is set to NOT NULL
and as the message states, the year exceeds what is shown in the message
Also, are the date formats aligning?
Example: 10/20/2021 (October the 20th) is a valid date in the US date format, but it will likely fail if you pass it as 20/10/2021 (20th of October) even if it’s a legal format in the APAC time zone.