If I were to do this with scripting I would use different method. One option would be to use Informat:
Names Default To Here(1);
dt = New Table("Untitled",
Add Rows(1),
New Column("Col", Numeric, "Continuous", Format("Best", 12), Set Values([20220103]))
);
wait(1);
Column(dt, "Col") << Set Each Value(Informat(Char(:Col), "YYYYMMDD"));
wait(1);
Column(dt, "Col") << Format("m/d/y", 12);
-Jarmo