Sql Server Date Format DD-Mon-YY

Viewed 20931

We're working to migrate our app from Oracle 11 to SQL Server 2014. There are lot of places in our Java code that expects the date in DD-Mon-YY format. I couldn't find an option with convert or any other built-in function to do this with out stuffing "-" in to the converted string.

Today we are using something like

upper((((CONVERT(NVARCHAR, Dt_Column, 113), 3, 1, '-'), 7, 3, '-'),1,18))

We are using this for multiple columns in the same view that loads a few hundred thousand rows, I'm suspecting it might affect our performance. Any inputs/thoughts will be helpful. Thank you in advance.

2 Answers
Related