If you want to just remove [] from your string you can provide multiple values for Substitute for example in a list
Names Default To Here(1);
my_str = "[20231216]";
my_new_str = Substitute(my_str, {"[", "]"}, ""); //"20231216"
or you could use regex with something like this
Regex(my_str, "\[\[(.*)\]]\", "\1"); // "20231216"
Edit:
Regex can also be used to replacements if needed
Regex(my_str, "\[\[|\]]\", "", GLOBALREPLACE); // "20231216"
-Jarmo