add batch remove batch split batch comment selection show hidden batches hide batch highlight batch
db<>fiddle
donate feedback about
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
CREATE TABLE YourTable (CalendarColumn varchar(100))
INSERT YourTable VALUES
('31.01.2022'),
('31.01.2022'),
('30.11.2021'),
('31.12.2021'),
('30.11.2021'),
('28.02.2022'),
('28.02.2022'),
('#')
8 rows affected
SELECT
ISNULL(
CONVERT(varchar(20),
TRY_CONVERT(date, t.CalendarColumn, 104),
23),
t.CalendarColumn) AS Calendar
FROM YourTable t
Calendar
2022-01-31
2022-01-31
2021-11-30
2021-12-31
2021-11-30
2022-02-28
2022-02-28
#