Page 1 of 1

Date format using wfsave

Posted: Wed Jan 23, 2013 7:59 am
by vivienle
Hello,
I am using the following command line to export monthly series that end in _hp to Excel using wfsave.
wfsave(2,t=excel,maptype=n) "W:\EViews\test_write_potential.xls" @keep *_hp
The dates exported are in the format of YYYY/MM/DD showing the first date of each month. I actually want the dates to be the last date of the month in DD/MM/YYYY. Is it possible to do that using wfsave? I know "write" has the option to convert dates to the last date but I need to use wfsave. Also, I don't want to use @datestr to get to the DD/MM/YYYY format as the dates would be exported as text instead of date value.
Thanks,
viv

Re: Date format using wfsave

Posted: Wed Jan 23, 2013 9:48 am
by EViews Chris
The following command

wfsave(2,t=excel,maptype=n) "W:\EViews\test_write_potential.xls" @keep @enddate *_hp

will add an extra column containing the end of period dates (where @enddate will be an excel date number, not a string).

I'm afraid we always set the cell format to YYYY-MM-DD at the moment.

Chris

Re: Date format using wfsave

Posted: Wed Jan 23, 2013 10:19 am
by vivienle
Hi Chris,
Thanks for your quick response!!!
So I added @enddate and I did get an extra column with the end dates. For some reason, Excel seems to have problem reading the dates. For example, the value is "01/31/1950 12:00:00 AM" but it's displayed as "02/01/1950 12:00:00 AM" in Excel and read as 02/01/1950 if you use the date to do calculations. Would you know why and how to fix it?
Thanks again,
viv