I wrote the following script that works properly on /ds/shell but it doesn't when I run it within a .tcl page
set vigencia 2011/03/10
set vigencia [string map {/ -} [lindex $vigencia 0]]
set date2 [clock format [clock scan "1 year" -base [clock scan $vigencia]] -format %Y%m%d]
set date1 [clock format [clock scan "-1 year" -base [clock scan $date2]] -format %Y%m%d]
Any ideas?
The error is:
[14/Oct/2011:09:24:14][1332.3059506032][-default:3-] Error: GET http://172.16.1.161:8000/ba-file?
referred by ""
unable to convert date-time string "10-01-2011"
while executing
"clock scan $vigencia"
("3" arm line 5)
invoked from within
"switch $i {
3 {
# vigencia
set vigencia [string map {/ -} [lindex $element 0]]
set vigencia "[clock format [clock scan $vigencia] -forma..."
("foreach" body line 6)
invoked from within
"foreach element $elements {
#ns_log Notice "$element"