Clovertech
› Clovertech Forums › Read Only Archives › Cloverleaf › Cloverleaf › Splitting up a field
Hopefully this is and easy one (and probably is).
I have a date and time field, format YYYYMMDDHHMMSS, on the input and want break it apart in the xlate into seperate fields:
YYYY
MM
DD
HH
SS
Is there a way to substring the field starting at position X for length Y?
Thanks!
set yyyy [string range 0 3 $datetm]
set mm [string range 4 5 $datetm]
etc (I think you get the idea) should do it.
where: $datetm is the original date/time data.
email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.
Thanks so much. I knew it was there somewhere just couldn’t find the right syntax.