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.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 SQL SERVER date Format

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-02-20 : 09:13:52
Simon Chung writes "Hi there,

I had been trying out this for days but I just can't find a wat to convert the format stored in the database. I'm using SQL Server 7 and planning to migrate to SQL Server 2K.



The Default format for Date is : mm/dd/yyyy

The format that I want is : dd/mm/yyyy


is it possible for me to change date format that according the the one I had written up there for both the version of SQL?

Thanks in advance.

Simon"

Nazim
A custom title

1408 Posts

Posted - 2002-02-20 : 10:00:30
this should do what you are looking for.
set date dmy

Check for Convert in BOL if you want to work on fields.



--------------------------------------------------------------
Go to Top of Page

Spyder
SQLTeam Author

75 Posts

Posted - 2002-02-22 : 02:37:15
Try this:

SELECT CONVERT(CHAR(10),GETDATE(),103)

It will yield today's date (Feb. 22, 2002) as '22/02/2002'.

Go to Top of Page
   

- Advertisement -