Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
SQL Server 7,2000
»
Globalization
»
Thai Buddhist Calendar format in SQL Server
Thai Buddhist Calendar format in SQL Server
Rate Topic
Display Mode
Topic Options
Author
Message
ganand_online
ganand_online
Posted Thursday, April 17, 2008 3:30 AM
Forum Newbie
Group: General Forum Members
Last Login: Thursday, April 17, 2008 6:29 AM
Points: 5,
Visits: 6
People in Thailand use the Thai Buddha calendar format, which is 543 years ahead of the Gregorian calendar format. The year in the Thai Buddha calendar now is 2551. This, though handled in the operating system (Windows 2003), is not handled in SQL Server 2005.
I have tried searching settings in SQL Server, but have not been able to find anything. Is there a setting where I can set the calendar/date formats at the server/database level?
Steps to reproduce the problem:
1. Change Windows regional settings to Thai.
2. Add the Thai language in the Windows regional settings.
3. Set THAI_CS_AS as the default collation during SQL Server installation.
4. Set THAI_CS_AS as the collation for the database I'm testing this on.
5. Set the default language to Thai (sp_configure 'default_language', 32)
6. Run the following commands:
===
set language Thai
go
set dateformat 'dmy'
go
DECLARE @Today DATETIME
SET @Today = '12/1/2008'
SELECT DATENAME(month, @Today) AS 'Month'
===
The output I get is this (and this is the expected output): มกราคม
However, when I try running the same query to get the date:
===
DECLARE @Today DATETIME
SET @Today = '12/1/2008'
SELECT DATENAME(year, @Today) AS 'Year'
===
I get '2003' as the output. It should be displaying 2551.
I would like to know if there is a setting where I can set the calendar format from Gregorian to Thai Buddhist at the database/server level.
SOS !!!
Post #486237
RyanRandall
RyanRandall
Posted Thursday, April 17, 2008 4:08 AM
SSCommitted
Group: General Forum Members
Last Login: Tuesday, May 29, 2012 11:22 AM
Points: 1,755,
Visits: 4,652
Duplicate post.
http://www.sqlservercentral.com/Forums/Topic486239-149-1.aspx
Ryan Randall
Solutions are easy. Understanding the problem, now, that's the hard part.
Post #486256
« Prev Topic
|
Next Topic »
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.