johnlopez2000
Programmer
I am attempting to start at one date and iterate to some final date, incrementing by one day per iteration. My code:
set xProcessingDate [clock format [expr [clock scan seconds]] -format %D]
set xStartDate [clock format [expr [clock scan 11/8/03]] -format %D]
while {$xStartDate <= $xProcessingDate} {
....
}
it would appear that it is incorrectly resolving the date.
.
.
.
I answered my own question, but decided to post for posterity:
% set xProcessDate [clock scan seconds]
1076964597
% set xStartDate [clock scan 11/8/03]
1068267600
% if {$xStartDate < $xProcessDate} { puts HI } { puts BYE }
HI
% set xStartDate [expr [clock scan seconds] + 86400]
1077051097
% if {$xStartDate < $xProcessDate} { puts HI } { puts BYE }
BYE
have a good one!
John Lopez
Enterprise PDM Architect
lopez.john@goodrich.com
set xProcessingDate [clock format [expr [clock scan seconds]] -format %D]
set xStartDate [clock format [expr [clock scan 11/8/03]] -format %D]
while {$xStartDate <= $xProcessingDate} {
....
}
it would appear that it is incorrectly resolving the date.
.
.
.
I answered my own question, but decided to post for posterity:
% set xProcessDate [clock scan seconds]
1076964597
% set xStartDate [clock scan 11/8/03]
1068267600
% if {$xStartDate < $xProcessDate} { puts HI } { puts BYE }
HI
% set xStartDate [expr [clock scan seconds] + 86400]
1077051097
% if {$xStartDate < $xProcessDate} { puts HI } { puts BYE }
BYE
have a good one!
John Lopez
Enterprise PDM Architect
lopez.john@goodrich.com