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 |
nice123ej
Starting Member
48 Posts |
Posted - 2010-08-30 : 08:41:20
|
Hiis there any way in SQL Server i can change the DateTime format to accept dd/mm/yyyy as date formatso when users run this script they dont get errordeclare @dt datetimeset @dt = '28/10/2009'select @dtwhat i want is to know how change the sql server so it can understand that the string with dd/mm/yyyy format is the right format for date and accept itThanks |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-08-30 : 09:54:01
|
you need to change language setting to British English or use SET DATEFORMAT dmy for that. why dont you pass dates always in universally accepted iso format? (YYYYMMDD)------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
|
|
|