Originally posted by Kumar Ananth
Can clock scan handle year '1900'? I'm have a tcl proc called age_in_yrs which takes DOB(YYYYMMDD) and returns age in years.
The tcl appers to be working all times expect when getting a "19000101" as DOB.
Below is the age_in_yrs tcl code:
set dob [lindex $xlateInVals 0]
set date1 [clock scan $dob]
set date2 [clock seconds]
set elapsedDays [expr {($date2 - $date1) / (60 * 60 * 24)}]
set elapsedYears [expr {$elapsedDays / 365.25}]
set xlateOutVals $elapsedYears