I have the following format for "dates" stored as strings, see 2 examples:
vrijdag 1 mei 2020,
donderdag 4 juni 2020
Now I want to date_parse but the problem is that this doe not work on Dutch dates. The workaround I have now is to replace the first part (the dutch day names) with '' and to replace the dutch month names with the english version. Like so:
SAFE.PARSE_DATE("%d %B %Y", REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(
REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(dutchdate,
'maandag', ''), 'dinsdag', ''), 'woensdag', ''), 'donderdag', ''), 'vrijdag', ''
), 'zaterdag', ''), 'zondag', ''), 'januari','january'),'februari','february'),'maart','march'
),'mei','may'),'juni','june'),'juli','july'),'augustus','august'),'oktober','october'))
This looks quite stupid to me so I was wondering if there is a better way to achieve this? Like a language parameter that some other SQL dialects have?
