Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to change date format in MSSQLSERVER permanently

Status
Not open for further replies.
Jul 16, 2002
2
IN
I am Facing a problem while making an application in VB.
While entering the date in VB it is in DD/MM/YYYY format,
Thats why i want to change the format of sqlserver to DD/MM/YYYY from MM/DD/YYYY.
 
Set the language of the user login to the country you need.
For example setting it to dutch wil give you the dd/mm/yyyy format.

In your connectionstring you log on as a sertain user, check in SQL server under securety and open the properties of that user.
In the general tab you can set the language of that user.

In SQL server dates are stored as a number (simular to Javascript), you only provide a way to display that number and to give sql server a date format so it can convert that date to a number.
 
Hi programmingguru,
the hammerjier way is deaing with that problem u face correctly..
i also have a suggesstion if at all f you are in a postion to control the input of the data, then u can use a DTPICKER control( You have to add Microsoft Windows common control 2.6 from the components.. which will load a set of controls and DTPicker is one among them).and u can literally set any format of date in that control and the entered value can be acheived. just by capturing
"Control.value" property.
hope this might be of any help.
Regards
Selva.T
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top