how to change the number of date in the same way collation does for varchar.

rajesh yadav 166 Reputation points


I have seen collation affects var char, I need to change the date and number and currency also in the same language but found that after using the set language it affects the text of the date not the number,

is there any way that I can change the number, currency or number part of date? like can we see numer of the date part in arabic or roman

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
10,920 questions
{count} votes

Accepted answer
  1. NikoXu-msft 1,911 Reputation points

    Hi @rajesh yadav ,

    SQLServer sorting rules only affect columns of character type, for example: char, varchar, text, nchar, nvarchar, ntext, so in the query view sys.columns the sorting rule for non-character fields shows NULL.
    Although the database sorting rules can be changed, but it is problematic, because even if the database sorting rules are changed, the sorting rules of the fields in the library table may still be the original, not changed, which in use, there may be problems, so the database sorting rules try not to change at will.

    Best regards

    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

2 additional answers

Sort by: Most helpful
  1. Olaf Helper 33,836 Reputation points

    I have seen collation affects var char,

    And it really only effects texts stored in a column of type varchar; and absolutly no other data types.
    date, integer etc. are only values without any format information; the client formats those values, not the database engine.

    0 comments No comments

  2. Erland Sommarskog 87,271 Reputation points

    Numbers and dates are stored in binary format, they are not stored in text format. They are displayed as strings in the UI, for instance SSMS, because humans can read strings better than binary values. But don't confuse storage format and presentation format.

    Interesting enough, SSMS does not seem to have any option to respect Regional Settings. But if you write your own application, you can use whichever string representation you like.

    0 comments No comments