Change the Date Representation in a Program

For questions regarding programming in the EViews programming language.

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

MacroDave
Posts: 2
Joined: Tue Feb 22, 2022 10:49 pm

Change the Date Representation in a Program

Postby MacroDave » Wed Mar 02, 2022 6:15 pm

Is it possible to change the date representation (say from month/day/year to day/month/year) found in general options in an EViews program? I have a VBA program that is pushing some dates to EViews to set the smpl for the workfile. It works fine if the General Options -> Date Representation is set the same as my Excel but not if it isn't.

Thanks

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

Re: Change the Date Representation in a Program

Postby EViews Gareth » Wed Mar 02, 2022 6:52 pm

Not quite.

Option 1) Use YYYY/MM/DD format in your VBA code.

Option 2) Use optset to temporarily override the global settings to one of your choice.
Follow us on Twitter @IHSEViews

MacroDave
Posts: 2
Joined: Tue Feb 22, 2022 10:49 pm

Re: Change the Date Representation in a Program

Postby MacroDave » Thu Mar 03, 2022 10:34 pm

Thanks Gareth, appreciate it


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 16 guests