Quantcast
Channel: SQLServerCentral » SQL Server 2014 » Development - SQL Server 2014 » Latest topics
Viewing all articles
Browse latest Browse all 3145

change DATE format to DD/MMM/YYYY

$
0
0
I have created a table with a field Register_Date in DATE format. However, it results showed me 21/12/2008 I would like to change it to 21/Dec/2008 How do I change that using SQL command? I tried to Google and used codes like below and it will not work[quote]SELECT CONVERT( CHAR(6), Register_Date, 106 )FROM REG[/quote]The error message was ORA-00936: missing expressionI also tried:[quote]SELECT replace(convert(char(15),Register_Date,106),' ',' - ')FROM REG[/quote]and it gives it the same error message. Any suggestions?Thanks

Viewing all articles
Browse latest Browse all 3145

Trending Articles