Page 1 of 1
Illegal date when importing txt file
Posted: Tue Feb 11, 2025 8:56 am
by patrice
Hello,
When trying to import this txt file, I have this error message:
Illegal date ?.
Here my code:
Code: Select all
wfcreate m 2010 2025
import(type=txt, resize) "c:\temp\eviews_issue.txt" ftype=ascii rectype=crlf skip=0 fieldtype=delimited custom=";" colhead=1 namepos=custom eoltype=pad badfield=NA @smpl @all
If I remove the last row, it's working fine.
I tested this under all these version, with same bug:
- Eviews 13 Jun 20 2024 build
- Eviews 14 Dec 26 2024 build
Thanks for your help.
Re: Illegal date when importing txt file
Posted: Tue Feb 11, 2025 9:06 am
by startz
If you could post that last row in the text file there's better chance someone might catch what's wrong.
Re: Illegal date when importing txt file
Posted: Tue Feb 11, 2025 9:19 am
by patrice
The attached txt file in the ticket contains this row, I have the error message using this txt file.
Re: Illegal date when importing txt file
Posted: Tue Feb 11, 2025 9:30 am
by startz
If it helps, I get the same error you do. But if I use File/Open it appears to work. No idea why.
Re: Illegal date when importing txt file
Posted: Tue Feb 11, 2025 12:00 pm
by patrice
Thanks, but unfortunatly I'm using this in an eviews program.
Re: Illegal date when importing txt file
Posted: Tue Feb 11, 2025 7:17 pm
by EViews Gareth
You're trying to import panel data (I think?) into a dated workfile, and it is failing.
Rather than create the workfile and then import, just open the text file as a new workfile.
Code: Select all
wfopen "c:\temp\eviews_issue.txt" ftype=ascii rectype=crlf skip=0 fieldtype=delimited custom=";" colhead=1 namepos=custom eoltype=pad badfield=NA @smpl @all
Then manipulate it after opening.
Re: Illegal date when importing txt file
Posted: Tue Feb 11, 2025 7:25 pm
by startz
Some of the dates look like 201001. Is there a good way to handle that?
Re: Illegal date when importing txt file
Posted: Wed Feb 12, 2025 12:30 am
by patrice
You're trying to import panel data (I think?) into a dated workfile, and it is failing.
Rather than create the workfile and then import, just open the text file as a new workfile.
Code: Select all
wfopen "c:\temp\eviews_issue.txt" ftype=ascii rectype=crlf skip=0 fieldtype=delimited custom=";" colhead=1 namepos=custom eoltype=pad badfield=NA @smpl @all
Then manipulate it after opening.
Thanks for this, but do-you know why there is this error message ? is-it a eviews bug ? (It's not an easy task to change my program)
Re: Illegal date when importing txt file
Posted: Wed Feb 12, 2025 8:25 am
by EViews Gareth
The last line of your file has no date.