0
I was able to convert the date to year / month, but I need the date to go like this: 2019/04, but it’s coming out like this: 2019/4
how can I fix this?
SELECT CONVERT(VARCHAR(4), DATEPART (year,'01/04/2019')) + '/' + CONVERT(VARCHAR(4),DATEPART(month,'01/04/2019')) as AnoMes
select (Convert(varchar(200), year(Convert(date, '01/04/2019'))) + '/' + Convert(varchar(200), Month(Convert(date, '01/04/2019')))
– Thomas Erich Pimentel