I need to convert a date in SQL. The date as is 15-May-2019
and it should display as 2019/05/15
.
This is the code I have so far
CASE WHEN WHEN LEN(AgeGroup) > 1 THEN PATINDEX ('%[A-Z]%', date)
I'm not completely sure how to use Patindex
. Can someone please help me to fix this?