Originally posted by Michael Lacriola
I want to be able to convert a date/time stamp into a string like below that would include the time as well. If I add the time on the end of the string in either HHMM or HHMMSS format, the proc fails. Any ideas? I'm interested in getting the Day, Month and CST (or CDT) portion of the returned string (0,1, and 4 if treating like a list).
Notice that 20120311 was the time change date but CST is correct for 00:00:00, but not for 03:00:00. That is why I need the time included.
tcl>set dt 20120311
20120311
tcl>
tcl>clock format [clock scan $dt]
Sun Mar 11 00:00:00 CST 2012
tcl>
tcl>set dt 201203111234
201203111234
tcl>
tcl>clock format [clock scan $dt]
Error: unable to convert date-time string "201203111234"
tcl>
tcl>set dt 20120311123456
20120311123456
tcl>
tcl>clock format [clock scan $dt]
Error: unable to convert date-time string "20120311123456"
tcl>