Articles in this section
Category / Section

Resolving SQL Server Exception: Conversion of Varchar Data Type to Datetime Data Type Resulted in an Out-of-Range Value

Published:

When working with SQL Server, you may encounter an exception that states: “Unable to retrieve schema. Reason: The conversion of a varchar data type to a datetime data type resulted in an out-of-range value.” This error typically occurs when there is a mismatch in the date format. For instance, if you have used the DD/MM/YYYY format for a parameter and the SQL Server is set to the MM/DD/YYYY format.

image.png

Solutions

Here are a few solutions to overcome this problem:

  1. Change the Dashboard Parameter Format: Modify the dashboard parameter format to MM/DD/YYYY or YYYY/MM/DD. This should align with the SQL Server’s date format.

    image.png

  2. Ensure Consistency in Date Formats: Make sure the SQL Server database date format is the same as the system date format and parameter date format. If they are not the same, you can modify them using specific SQL commands.

    image.png

    image.png

    image.png

Was this article useful?
Like
Dislike
Help us improve this page
Please provide feedback or comments
RM
Written by Reethika Moovendhan
Updated
Comments (0)
Please  to leave a comment
Access denied
Access denied