Date Format

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt

GFXFTS
Posts: 40
Joined: Wed Nov 21, 2018 10:33 am

Date Format

Postby GFXFTS » Mon Jan 21, 2019 2:38 am

Hello,

I would like to write data from a workfile to a txt file with such a command for example:

write(t=txt,dates,nonames) C:\SENN\Models\Artificial\MLP\DATA\Data.txt YAR1LIN

When I open the .txt file the date format looks like this: "2/01/1970"

However, I would need such a format 1970-01-02 without the quotation marks.

Is that possible by chance?

Thanks a lot,

Guenter

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13098
Joined: Tue Sep 16, 2008 5:38 pm

Re: Date Format

Postby EViews Gareth » Mon Jan 21, 2019 8:34 am

Create an alpha series in your workfile with the date expressed however you want. Then save the workfile including that alpha series.
Follow us on Twitter @IHSEViews

GFXFTS
Posts: 40
Joined: Wed Nov 21, 2018 10:33 am

Re: Date Format

Postby GFXFTS » Mon Jan 21, 2019 8:46 am

Hi Gareth, That worked. It still saves it with the quotations marks though: "1970-01-05". Any chance to get rid of those as well? Thanks a lot, Guenter

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13098
Joined: Tue Sep 16, 2008 5:38 pm

Re: Date Format

Postby EViews Gareth » Mon Jan 21, 2019 10:13 am

Try using wfsave rather than write.
Follow us on Twitter @IHSEViews

GFXFTS
Posts: 40
Joined: Wed Nov 21, 2018 10:33 am

Re: Date Format

Postby GFXFTS » Mon Jan 21, 2019 12:32 pm

Hi Gareth, That worked but now I can't get rid of the first row :-( Best, Günter
dateid01 x y yar1lin yar1nonlin
1970-01-02 0 0 0 0
1970-01-05 0.11613408655140802 0.13072153426672658 0.13072153426672658

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13098
Joined: Tue Sep 16, 2008 5:38 pm

Re: Date Format

Postby EViews Gareth » Mon Jan 21, 2019 1:12 pm

There’s a nonames option.
Follow us on Twitter @IHSEViews

GFXFTS
Posts: 40
Joined: Wed Nov 21, 2018 10:33 am

Re: Date Format

Postby GFXFTS » Mon Jan 21, 2019 1:52 pm

Tried that one as well but didn't seem to work: wfsave(type=text,nonames) artificial_undated6.txt . I have attached the files. Thanks a lot, Günter
Attachments
artificial_data_d.wf1
(54.86 KiB) Downloaded 227 times
artificial6.txt
(76.86 KiB) Downloaded 240 times

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13098
Joined: Tue Sep 16, 2008 5:38 pm

Re: Date Format

Postby EViews Gareth » Mon Jan 21, 2019 6:00 pm

Code: Select all

wfsave(type=text) artificial_undated6.txt nonames
Follow us on Twitter @IHSEViews

GFXFTS
Posts: 40
Joined: Wed Nov 21, 2018 10:33 am

Re: Date Format

Postby GFXFTS » Tue Jan 22, 2019 4:02 am

Brilliant. That worked. Thank you very much. Best, Günter

mmiller2
Posts: 29
Joined: Tue Aug 23, 2016 9:56 am

Re: Date Format

Postby mmiller2 » Tue Jun 22, 2021 4:50 am

Would you mind updating the documentation to specify that nonames must be supplied in the argument list to pagesave rather than as a parenthetical option? The other approach would be to fix pagesave to work as described in the documentation, but that would undoubtedly break a lot of EViews programs out there. Is it possible to make it so that nonames can be specified as BOTH a parenthetical option or an (undocumented) argument in the list - for backwards compatibility?

http://www.eviews.com/help/helpintro.ht ... esave.html

jibe
Posts: 7
Joined: Thu Jul 23, 2015 7:52 am

Re: Date Format

Postby jibe » Wed Jul 20, 2022 4:17 am

Please correct documentation for pagesave command so that nonames option appears after filename not in the parentheses.
I just wasted hours puzzling over this until I came across this post from June 2021! Thanks

EViews Steve
EViews Developer
Posts: 699
Joined: Tue Sep 16, 2008 3:00 pm
Location: Irvine, CA

Re: Date Format

Postby EViews Steve » Thu Jul 21, 2022 3:25 pm

Actually, we made this change in EViews 12 so that you could specify the NONAMES argument as an option instead.

But it turns out there was a bug in EViews 12 where if you didn't specify any attributes to be exported at the same time, the NONAMES option was being ignored. This will be fixed in the next 12 patch.

We'll make a note in the documentation that the NONAMES option only works for EViews 12 and newer. Older versions will require the NONAMES argument.

jibe
Posts: 7
Joined: Thu Jul 23, 2015 7:52 am

Re: Date Format

Postby jibe » Fri Jul 22, 2022 8:05 am

Thanks.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 14 guests