Problem with numbers converted to dates

For questions regarding the import, export and manipulation of data in EViews, including graphing and basic statistics.

Moderators: EViews Gareth, EViews Jason, EViews Steve, EViews Moderator

hwong
Posts: 11
Joined: Mon Mar 30, 2009 7:40 am

Problem with numbers converted to dates

Postby hwong » Wed Feb 13, 2019 3:20 am

Hello, I am manipulating series where the numerical result should be around 700,000. However Eviews 10 returns the result as a date. For example if I run the following in the commands window test3 comes out as a date:

wfcreate a 1990 2050
series test1=681942
series test2=47279
series test3=test1+test2
show test1 test2 test3

I know this is to do with date numbers in Eviews, but should this be happening? I am using Eviews 10+ (Jan 29 2019 build) but it also happens in build versions from 2017 and in Eviews 9. However this didn't happen in Eviews 8.

Thanks for your help.

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

Re: Problem with numbers converted to dates

Postby EViews Gareth » Wed Feb 13, 2019 8:39 am

Dates are just numbers. It sounds as though EViews is just displaying your numbers as dates. You can tell it to display them as numbers instead by clicking the Properties button of the series.

But calculation wise nothing incorrect is happening.
Follow us on Twitter @IHSEViews

hwong
Posts: 11
Joined: Mon Mar 30, 2009 7:40 am

Re: Problem with numbers converted to dates

Postby hwong » Wed Feb 13, 2019 9:24 am

Thanks for the reply. In a program this would be done using the setformat command? The problem is that it appears the default is to convert these numbers into a date. It means when we export it into Excel the series it affects are shown as dates whilst others are numbers. My colleagues have the same issue. Is there a way to change the default in the global settings?

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

Re: Problem with numbers converted to dates

Postby EViews Gareth » Wed Feb 13, 2019 9:38 am

Indeed, setformat.
Follow us on Twitter @IHSEViews

hwong
Posts: 11
Joined: Mon Mar 30, 2009 7:40 am

Re: Problem with numbers converted to dates

Postby hwong » Wed Feb 13, 2019 9:57 am

Thanks. Is there a way to set a global default. Or find out what that default is?

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

Re: Problem with numbers converted to dates

Postby EViews Gareth » Wed Feb 13, 2019 10:50 am

Unfortunately not.
Follow us on Twitter @IHSEViews

hwong
Posts: 11
Joined: Mon Mar 30, 2009 7:40 am

Re: Problem with numbers converted to dates

Postby hwong » Thu Feb 14, 2019 2:50 am

Can this be added to future updates or versions? As the default in my version is to display these as dates it means I will have to loop through all the series to set the format.

hwong
Posts: 11
Joined: Mon Mar 30, 2009 7:40 am

Re: Problem with numbers converted to dates

Postby hwong » Tue Feb 19, 2019 3:24 am

Hi Eviews support team - just wondering if there have been any thoughts on my last post?

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

Re: Problem with numbers converted to dates

Postby EViews Gareth » Tue Feb 19, 2019 8:04 am

We understand your issue and will think about what can be done in in future versions of EViews
Follow us on Twitter @IHSEViews

mamo
Posts: 125
Joined: Wed Nov 07, 2012 9:11 am

Re: Problem with numbers converted to dates

Postby mamo » Thu Feb 21, 2019 3:24 am

Dear Eviews teasm

as a user of Eviews 10 March 18 build, I remember that I encountered the same issue in the past.

Having read this post, I digged a bit deeper.

- The phenomenon appears in workpages with number of observations (@obsrange) >= 10 in the first place. If @bsrange < 10, any figure is represented in the sheet view as a figure. The structures of the page (undated, dated, panel) does not matter. What matters is @obsrange.

- If @obsrange >= 10, integers <= 693594 are displayed as numbers; the integer 693595 is displayed as a date "1900" in the format yyyyy; integers between 693596 and 766044 are displayed as dates between 1900-01-02 and 2098-05-11, i.e. in the format "yyyy-MM-dd", and integers >= 766045 are again displayed as numbers (see example program below)

I would feel that this behavior is incoherent from the perspective of the user - coming close to a bug. It would therefore indeed be good if this can be corrected in future updates/versions. Per default, numbers should be displayed as numbers

Best mamo

Code: Select all

' Any page structure with at least 10 observations
' wfcreate M 1900M1 1900M10
' wfcreate Q 1900Q1 1902Q2
' wfcreate A 1900 1909
' wfcreate A 1900 1901 5
wfcreate u 10
series x1=693594  'displayed as number
series x2=693595  'displayed as date [yyyy]: 1900
series x3=693596  'displayed as date [yyyy-MM-dd]: 1900-01-02
series x4=766044  'displayed as date [yyyy-MM-dd]: 2098-05-11
series x5=766045  'displayed as number

show x?

' Shrink page to @obsrange=9
' pagestruct(start=@first, end=@last-1) 
' Now everything shown as a number - but only if show-command above commented out, i.e. x? not being displayed before.
' show x? 

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

Re: Problem with numbers converted to dates

Postby EViews Gareth » Thu Feb 21, 2019 7:29 am

The issue with “all numbers should be displayed as numbers” is that dates are numbers and by imposing that rule, dates would never be shown as dates.

Thus we have some simple rules to try and automatically figure out if a series contains actual data or dates.
Follow us on Twitter @IHSEViews


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 3 guests