>>I have a text file that is being created by VFP, and it has some blank dates in it - so when they do the export it looks like this:
>>
>>|01/15/2017|/ /|02/17/2016
>>
>>..the problem is that part where it says "/ /" -- well I need that to be completely blank with no spaces or anything -- so that the line in the file ends up looking like this:
>>
>>|01/15/2017||02/17/2016
>>
>>Anyone know of an easy way to do this? Or maybe a tweek to the COPY TO command that's creating the file to being with???
>>
>>Thanks :)
>
>
Strtran(lcString,"/ /","")
But it's a date field in the table not a character field so I don't see how I could use that. What I'm doing is a copy command like this:
COPY TO &afile delimited with "" with character '|'
...I suppose I could copy to a temp table, add a new column that is a character field, then use the DTOC() that holds the character value of the date and wrap what you're saying around that.
so I would:
1. Copy to a temp table
2. Alter temp table, add new field
3. Do something like this to populate new field: replace all myFieldB with Strtran( DTOC(myFieldA),"/ /","")
4. Alter temp table to remove the original date field
5. run my COPY TO command
Seems like a pain in the neck though lol -- I would think there should be a better way.
ICQ 10556 (ya), 254117