If one is at Cloverleaf release 6.1.1 or later, one can use thee Xlate STRING Action (range function) to pull out the pieces of the date (after all the pieces are always in the same place).
Then using the CONCAT Action combine the pieces back together as needed.
Could be used if the reverse is true (CCYYMMDD to MM/DD/CCYY).
email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.
You have already broken the date into a list. Each element in the list is part of the new date format that you need. I think you can just change your last line to:
set xlateOutVals “[lindex $date 2][lindex $date 0][lindex $date 1]”
That should put it in YYYYMMDD format. I hope that helps.
Not sure how Charlie let this slip through – xlateOutVals should always be a list. In this particular case it doesn’t matter, but best practice would be:
set xlateOutVals
-format “%Y%m%d”]]
- Mark Thompson
HealthPartners
Author
Replies
Viewing 4 reply threads
The forum ‘Tcl Library’ is closed to new topics and replies.