Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

dateformat need Expand / Collapse
Author
Message
Posted Thursday, December 5, 2013 4:04 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Friday, August 29, 2014 10:08 PM
Points: 210, Visits: 4,523
Hi Friend i have small doubt in date format in sql server
in my table having data like
date(dd/mm/year) and datatype is varchar(20)
1/1/2011
10/3/2012
9/8/2010
19/9/2007
9/11/2009


based on above data i need output like
date
01/01/2011
10/03/2012
09/08/2010
19/09/2007
09/11/2009
pleas tell me query how to solve this issuse
Post #1519945
Posted Thursday, December 5, 2013 4:26 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, December 17, 2013 3:43 AM
Points: 3, Visits: 9
hi

use like this

select CONVERT(date, '1/1/2011',103) as date

Regards,
Guru
Post #1519952
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse