Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: SQL
please help,
how to change the default date format of sql server 2008 to dd/mm/yyyy format
 

 
thanks in advance
Posted 29-May-12 5:34am
b3nz33r733
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 5

hiii
 
just Execute Commands as below
 
SET DATEFORMAT dmy;
 
to see changes
dbcc useroptions
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 6

EXEC sp_configure 'default language', '23';
go
RECONFIGURE
GO
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

  Permalink  
Comments
losmac at 29-May-12 12:39pm
   
Great! My 5!
Sandeep Mewara at 29-May-12 14:12pm
   
Thanks.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

just changed language to britan english
object Explorer=> security=> logins=>(user)=>Default language= Britan english
  Permalink  
Comments
Nelek at 29-May-12 17:38pm
   
That might solve it for now, but it is not a consistant solution. I would recommend you to have a look to the links Sandeep gave you.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 8

SET DATEFORMAT mdy
 
CHECK USING
 
DBCC UserOptions
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 9

SELECT CONVERT(VARCHAR(10), GETDATE(), 103) AS [MM/DD/YY]
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 12

Hi ,
/*For dd/mm/yyyy format*/
SELECT CONVERT(VARCHAR(10),@DateTime ,103) AS Date
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

It,s very simple just write the following query to get the default date in dd/mm/yyyy.
 
select convert(varchar,convert(datetime,getdate(),105),103).
 
Hope this help you thanks.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 4

using the convert method you can do it easily. Run the Follwing Query.
SELECT CONVERT(VARCHAR(8), GETDATE(), 1) AS [MM/DD/YY]
  Permalink  
v2
Comments
Davidduraisamy at 8-Mar-13 4:02am
   
he is asking about default dateformat...so this is correct---- SET DATEFORMAT dmy;
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 10

SELECT convert(varchar,getdate(),103)
 
This query will solve your problem....
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 11

if you want to change default sql date format into dd/MM/yyyy
 

use
SELECT convert(varchar(10),getdate(),103)
 

or you can get any date format if you have default sql date format
 
URL: SQL Server Functions that helps to convert date and time values to and from string literals and other date and time formats.[^]
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 BillWoodruff 260
1 Mathew Soji 244
2 Afzaal Ahmad Zeeshan 232
3 OriginalGriff 231
4 Maciej Los 230
0 OriginalGriff 6,369
1 Sergey Alexandrovich Kryukov 5,973
2 DamithSL 5,183
3 Manas Bhardwaj 4,673
4 Maciej Los 4,045


Advertise | Privacy | Mobile
Web01 | 2.8.1411019.1 | Last Updated 26 Jun 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100