I've created a program in FoxPro that takes a CSV file with limited data and assigns values and other things and then exports it to a comma delmited text file. The problem I've run into is that there are 2 dates in a row in this file, each of which will change each time this program is run.
Here's a small sample of the text file as is: 5137851,"CU","0",5/25/2013 0:00:00,"5/27/2013 0:00:00,"","","",1,41,30,3,41,32,4
I need to remove the quotation mark before the "5" in "5/27/2013 00:00:00
Right now I have this code in place to remove the quotation marks in certain areas.
strRecord = STRTRAN(strRecord, '0:00:00"," "', '0:00:00",')
strRecord = STRTRAN(strRecord, '0:00:00"," "', '0:00:00",')
strRecord = STRTRAN(strRecord, '0:00:00",', '0:00:00,')
strRecord = STRTRAN(strRecord, '"CU","0","', '"CU","0",')
strRecord = STRTRAN(strRecord, '0:00:00,"5','0:00:00,5')
The issue arises with that last line because the number is not always going to be a 5, it will be whichever month that the file comes in as. I can't do this either:
strRecord = STRTRAN(strRecord, '0:00:00,"', '0:00:00,')
because it will get rid of the first quotation mark in the three consecutive empty fields.
I can't think of any other way to edit this file to remove that quotation mark prior to the 5 in the second datetime field.
Thanks for your help in advance!