How to format datetime value to Mon.YY ?

 Posted by Bandi on 7/1/2015 | Category: Sql Server Interview questions | Views: 603 | Points: 40
Answer:

SELECT RIGHT(REPLACE(CONVERT(VARCHAR(9),GETDATE(), 6), ' ', '.'), 6) AS [Mon.YY] 



Output:

Mon.YY
Jul.15


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response