AnsweredAssumed Answered

How to clean text and format during or after import

Question asked by MacDevGuy on Feb 21, 2015
Latest reply on Jan 31, 2016 by MacDevGuy


How to clean text and format during or after import



I have a text file which is a log from TeamViewer. The log lists the sessions by client number "757123456" (which is usually maintained for the client but sometimes changes), start and end times as "DD-MM-YYYY<sp> HH:MM:SS" and a session id number as "{D44E5CD7-30F6-762B-A331-9B72031CB247}"

So a single entry would look something like this:

(The header is mine...)
Client ID               Sessoin Start                   Session End               admin    Type of session      Session ID
757123456          20-02-2015 10:25:22       21-02-2015 00:09:10  Billy   RemoteControl         {D44E5CD7-30F6-762B-A331-9B72031CB247}

The information is separated with spaces and as you can see the dates and times are combined for start and end time. What I want to do is strip the spaces and substitute them for tabs. I also want to (or maybe I should say I *may* need to) separate the date and times with the intent to write a calculation which gives me the elapsed time for the session.

So how do I deal with this? Can I import it into a container then use a calc to clean it and call a script to insert the resulting field data into their respective fields?