Homepage › Clovertech Forums › Read Only Archives › Cloverleaf › Cloverleaf › Puting a zero on to a date › Reply To: Puting a zero on to a date
July 15, 2005 at 4:17 pm
#57035
Charlie Bursell
Participant
set dt ” 50307″
# Adjust date to make it 6 bytes RJZF
# Note I use “s” here just in case of not all digits
set dt [format “%06s” [string trimleft $dt]]
# Assume century of 20
set century 20
# If year greater than 50 (or some value) make century 19
if {[string trimleft [string range $dt 0 1] 0] > 50} {set century 19}
# Now just append them
set newdate $century$dt