Another alternative, in Tcl, is to use a regular expression to transform the format “mmddyy” to the standard “mm/dd/yy” and call the “clock format” command on the resulting date string.
Example, from the Tcl command prompt:
% set mydate 090711
090711
% regsub {(d{2})(d{2})(d{2})} $mydate {1/2/3} dt
1
% echo $dt
09/07/11
% set newdate [clock format [clock scan $dt] – format %Y%m%d]
20090711