Hi Deepshikha,
In SQL Server, do like this ( I assume the data as you've mentioned to be -"1 6 2012")
select CONVERT(datetime,(RIGHT(dateCol,4)+'-'+ SUBSTRING(dateCol,3,1) +'-'+LEFT(dateCol,1))) from testTable;
if you want it to be -"01 Jun 2012" then try this:
SELECT CONVERT(VARCHAR(11), CONVERT(datetime,(RIGHT(testCol,4)+'-'+ SUBSTRING(testCol,3,1) +'-'+LEFT(testCol,1))), 106) AS [DD MON YYYY] from testTable;
Hope this serves the purpose.
Cheers!
Happy Coding :)
Sunny_K