By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
CREATE TABLE dbo.DateTable(DateColumn varchar(64));
INSERT dbo.DateTable(DateColumn) VALUES
('vendredi 23 juillet 2021'),
('mardi 30 novembre 2021'),
('mercredi 10 février 2021'),
('lundi 23 août 2021'),
('mardi 13 avril 2021'),
('samedi 3 juillet 2021'),
('jeudi 3 février 2022'),
('jeudi 13 mai 2022');
8 rows affected
SET LANGUAGE Français;
SELECT DateColumn, TRY_CONVERT(date,
SUBSTRING(DateColumn, CHARINDEX(' ', DateColumn) + 1, 64),
106)
FROM dbo.DateTable;
DateColumn | (No column name) |
---|---|
vendredi 23 juillet 2021 | 2021-07-23 |
mardi 30 novembre 2021 | 2021-11-30 |
mercredi 10 février 2021 | 2021-02-10 |
lundi 23 août 2021 | 2021-08-23 |
mardi 13 avril 2021 | 2021-04-13 |
samedi 3 juillet 2021 | 2021-07-03 |
jeudi 3 février 2022 | 2022-02-03 |
jeudi 13 mai 2022 | 2022-05-13 |
Le paramètre de langue est passé à Français.