Hi,
I am new to this forum and would appreciate some guidance please.
Recently in a new project I am working on, I converted an Oracle query to sql server query. I am having an issue on formatting my date field.
Currently,
SELECT REPLACE(RIGHT(CONVERT(VARCHAR(7),CONVERT(VARCHAR(7),MyDateColum),113),8),'','') AS JudgmentMonth
FROM myTable
WHERE MyDateColumn between 'yyyy-mm-dd' and 'yyyy-mm-dd'
GROUP BY REPLACE(RIGHT(CONVERT(VARCHAR(7),CONVERT(VARCHAR(7),MyDateColum),113),8),'','')The Output is in following format
2018-01
2018-02
2018-03
etc I want to change mm which is int to 3 lettered Month string so something like
Jan 2018
Feb 2018
Mar 2018
Can anyone help on how to achieve this?
Thanks