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 |
|
flinty82
Starting Member
1 Post |
Posted - 2007-10-22 : 03:55:30
|
| Hi Everyone,I am running SQL Server on Windows 2000 Server Edition and have had a problem with the date format in some of the tables. Specifically all of the days and the months have swapped around where they logically can. The original data was all saved as dd/mm/yy but has now all swapped over to mm/dd/yy - unless of course it will not form a logical date.The only thing which has happened which i can put this down to is that the server has just had service pack 3 installed on it. Has anyone ever encountered this before and if so is there an easy way to fix it? |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2007-10-22 : 04:00:08
|
| dates in the sql server are stored independant of the format.by using datetime parameters you will avoid this trouble.this is a problem of your client app and use of ad-hoc queries._______________________________________________Causing trouble since 1980blog: http://weblogs.sqlteam.com/mladenpSSMS Add-in that does a few things: www.ssmstoolspack.com |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2007-10-22 : 04:01:45
|
| You should always use datetime parameters and assign dates strings in YYYYMMDD HH:MM:SS format to avoid conflict with local settingsMadhivananFailing to plan is Planning to fail |
 |
|
|
aarumugavel
Starting Member
8 Posts |
Posted - 2007-10-22 : 05:09:58
|
| The Sql Server default format is MM/dd/yyyy. so ur given input date format into swap.so Better your given input format chages done with dd/MMM/yyyy (01/apr/2007) format. and also ur retrieve format changes into the dd/MMM/yyyy format. |
 |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2007-10-22 : 05:15:17
|
| > The Sql Server default format is MM/dd/yyyyhow do you figure that?_______________________________________________Causing trouble since 1980blog: http://weblogs.sqlteam.com/mladenpSSMS Add-in that does a few things: www.ssmstoolspack.com |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2007-10-22 : 06:17:03
|
quote: Originally posted by spirit1 > The Sql Server default format is MM/dd/yyyyhow do you figure that?_______________________________________________Causing trouble since 1980blog: http://weblogs.sqlteam.com/mladenpSSMS Add-in that does a few things: www.ssmstoolspack.com
He must have rundbcc useroptionsMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|