Homepage › Clovertech Forums › Read Only Archives › Cloverleaf › Cloverleaf › How to compare dates in a IF statement in an Xlate › Reply To: How to compare dates in a IF statement in an Xlate
November 15, 2005 at 10:40 pm
#57786
Rentian Huang
Participant
you can do something like this:
1. strip only the first 8 charactors from PV1-45 into a variable, ie. 20051011 -> @dischDate
2. set diff [expr {([getclock] – [clock scan $dischDate])/86400}] # 86400 sec per day
Now $diff will give you the actual number of day difference.
Sam