Forum OpenACS Development: Re: /ds/shell X tcl page

Collapse
2: Re: /ds/shell X tcl page (response to 1)
Posted by Dave Bauer on
I think you are missing some code.

set vigencia 2011/03/10
set vigencia [string map {/ -} [lindex $vigencia 0]]

Should return "2011-03-10"

Where does the string "10-01-2011" come from?

Collapse
3: Re: /ds/shell X tcl page (response to 2)
Posted by Iuri Sampaio on
What a shame!
Yes, i missed the first line.
The date was comming with the wrong format %d%m%Y.

I wrote a fix for that. Thanks Dave.

set vigencia [split $vigencia {-}]
set vigencia "[lindex $vigencia 2][lindex $vigencia 1][lindex $vigencia 0]"