Page 1 of 1 1
Topic Options
#39437 - 2003-04-22 10:42 PM CSV file modifications...
OnScoobySnacks Offline
Fresh Scripter

Registered: 2003-04-22
Posts: 7
I all first post,

I have finally got my .csv file(s) formated the way I want with the exception of a column. I need to convert an entire column, execpt the header, from cTime to human readable format. I've got the cTime UDF and a .csv file that looks like this:

"Date/Time","Media Server","Job ID","Client","Description"
"1050931725","server1","0","0","scheduler found no backups due to run"
"1050931946","server2","91764","client","successfully wrote backup id"
etc....

I just can't figure out how to change just the entire Date/Time, cTime, column then save the .csv with this readable Date/Time format?

A ScoobySnack to the first one to help [Big Grin]
_________________________
Doo'n it doggie style!

Top
#39438 - 2003-04-22 10:44 PM Re: CSV file modifications...
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
You will need to read each line with READLINE, then use SPLIT to split into fields, then extract the CTIME formthe firsy array field, convert with CTime() UDF, JOIN the arrays back and do a wRITYELINE into a new file.
_________________________
There are two types of vessels, submarines and targets.

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
1 registered (mole) and 1300 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.048 seconds in which 0.025 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org