Page 1 of 1

Problem with numbers converted to dates

Posted: Wed Feb 13, 2019 3:20 am
by hwong
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.

Re: Problem with numbers converted to dates

Posted: Wed Feb 13, 2019 8:39 am
by EViews Gareth
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.

Re: Problem with numbers converted to dates

Posted: Wed Feb 13, 2019 9:24 am
by hwong
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?

Re: Problem with numbers converted to dates

Posted: Wed Feb 13, 2019 9:38 am
by EViews Gareth
Indeed, setformat.

Re: Problem with numbers converted to dates

Posted: Wed Feb 13, 2019 9:57 am
by hwong
Thanks. Is there a way to set a global default. Or find out what that default is?

Re: Problem with numbers converted to dates

Posted: Wed Feb 13, 2019 10:50 am
by EViews Gareth
Unfortunately not.

Re: Problem with numbers converted to dates

Posted: Thu Feb 14, 2019 2:50 am
by hwong
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.

Re: Problem with numbers converted to dates

Posted: Tue Feb 19, 2019 3:24 am
by hwong
Hi Eviews support team - just wondering if there have been any thoughts on my last post?

Re: Problem with numbers converted to dates

Posted: Tue Feb 19, 2019 8:04 am
by EViews Gareth
We understand your issue and will think about what can be done in in future versions of EViews

Re: Problem with numbers converted to dates

Posted: Thu Feb 21, 2019 3:24 am
by mamo
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? 

Re: Problem with numbers converted to dates

Posted: Thu Feb 21, 2019 7:29 am
by EViews Gareth
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.