Hi Amon,
Few questions:
1. Whay are you using LTRIM for '.' ? i suppose you are getting some of the entries in this column starting with '.' But if that is not the case then you can avoid LTRIM, STRING function which you have used.
2. Does the column TST_TO have all the entries with 14 digits (as you have mentioned 20,130,302,230,000) ? if this is having all the entries with excatly 14 digits (no more, no less) then why dont you directly write LONGDATE("TST_TO").
Or say after trimming the '.' if you get exactly 14 digits then you can use
LONGDATE(LTRIM(STRING("TST_TO"),'.'))
3. If your column is not having 14 digits after removing the '.' then please use the method mentioned by Shreepad in his above post. But you need to make sure that none of the components return a value which can not be converted into integer e.g. a blank space, a blank string, any special character etc. I mean all the MIDSTR() components should return a number which the INT() function can use.
The first checkpoint for you would be to find out if you have all entries in the column with 14 digits. If that is maintained then you need go through all these convoluted process :-)
Regards,
Piyush