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
 Old Forums
 CLOSED - General SQL Server
 Setting date & time for SQL Server 2k

Author  Topic 

newace
Starting Member

5 Posts

Posted - 2004-08-24 : 02:20:07
how do i preset the date format for SQL Server? I want it to store all dates under the dd/mm/yyyy format in a datetime column type. Has it got something to do with the regional settings on the pc?

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2004-08-24 : 04:40:29
SET DATEFORMAT dmy

the date can then be formated as you like with convert


Go with the flow & have fun! Else fight the flow :)
Go to Top of Page

mohdowais
Sheikh of Yak Knowledge

1456 Posts

Posted - 2004-08-24 : 09:37:30
Actually all dates are stored as double integers. Doesn't really matter to the application how it is stored. You should try and use an unambiguous format such as yyyymmdd to insert the dates into the database and then format it on the presentation layer. Any front-end reporting tool/application should be able to use a datetime value and let you format it any way you like.

OS
Go to Top of Page
   

- Advertisement -