I’m trying to validate a date with TCL using the clock scan function. See code below:
set str “20050101T000000”
if {[catch {clock scan $str} err]} {
echo “Invalid Date”
}
This works fine however if I use a date that is less than January 1, 1902 then it fails. For example if the date passed in was 19000101T000000, then this would not work. Does anybody know how to get around this issue?