Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
djdanrt
Starting Member
15 Posts |
Posted - 2007-06-05 : 05:29:50
|
| Im in the UK and use SQL 2005 standard and it seems to be set to US date format. The servers all set up for UK date. How do you change SQL2005 to the UK date format(date,month,year)?ThanksDan |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2007-06-05 : 05:32:10
|
| [code]SET DATEFORMAT DMYGO[/code]Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
 |
|
|
djdanrt
Starting Member
15 Posts |
Posted - 2007-06-05 : 06:13:41
|
| Isnt there a setting in studio manager to change it to UK format? That setdate format doesnt seem to work. Am I missing something simple? You would think it would pull from the server settings rather than have it default to US date format. Does everyone in the UK have to use the set dateformat dmy?Dan |
 |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2007-06-05 : 06:29:32
|
| First of all, SET DATEFORMAT is only useful when you want SQL Server to interpret character date values as per specific format. Secondly, datetime data is stored in SQL server in its internal format, so you don't have to worry about format. Thirdly, your problem seems to be formatting problem and it should be handled at front-end.How did you find out that dates are stored in US format?Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2007-06-05 : 07:27:52
|
| 1 Use proper datatype DATETIME2 Dont worry on how dates are stored in the table3 Format the dates in front end if you use4 When expressing date literals, use YYYYMMDD formatMadhivananFailing to plan is Planning to fail |
 |
|
|
jsmith8858
Dr. Cross Join
7423 Posts |
Posted - 2007-06-05 : 08:29:41
|
| Madhivanan/harsh -- I think you are missing the point in this case -- he is asking how to configure a front-end client to show dates in a certain format, not about storing or formatting dates in SQL.djdanrt -- Are you using SQL Server Management Studio? I believe it uses your computer's settings to determine how to format the date. How is your computer configured to display dates? update: Yes, it just uses your PC's regional settings. Make sure your PC is configured to use the UK date format (or whichever one you want) in the control panel.- Jeffhttp://weblogs.sqlteam.com/JeffS |
 |
|
|
|
|
|