Could anyone please help me convert a string into a CSV string. Is it possible to put commas at specific positions? The code below puts a comma whereever it finds a space. I want commas at certain specified position?.
I know the exact start and end position of each substring that is of interest. E-g 00403 would always be 5 characters and the substring is (0,5) so I want to insert a comma after 00403 i-e after the 5th character of this substring, datetime i-e 2010-10-07 00:45:19.947 will always be 24 characters and the substring is (55,24) and I want to insert a comma after this datetime i-e after the 24th character. Is it possible? Please guide.
Above is just an example but which splits the string at each space it finds.