We will use Format function which returns a value formatted with the specified format and optional culture. This function will use three parameter i.e Value, format & Culture.
FORMAT ( value, format [, culture ] )
SQL Script to display Indian Rupee & USD:
SQL Script to display in Indian Languages:
FORMAT ( value, format [, culture ] )
SQL Script to display Indian Rupee & USD:
DECLARE @currency money = 9876.54;
SELECT @currency NoFilter,
FORMAT(@currency, 'C', 'en-us') 'en-us',
FORMAT(@currency, 'C', 'en-in') 'en-in'
SQL Script to display in Indian Languages:
DECLARE @currency datetime = GETDATE();
SELECT
FORMAT(@currency, 'D', 'en-us') 'en-us',
FORMAT(@currency, 'D', 'hi-in') 'hi-in',
FORMAT(@currency, 'D', 'gu-in') 'gu-in',
FORMAT(@currency, 'D', 'pa-in') 'pa-in';
Comments
Post a Comment
Thanks for your comment. In case of any concerns, please contact me at er.ashishsharma@outlook.com