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
Date format using wfsave
Moderators: EViews Gareth, EViews Jason, EViews Steve, EViews Moderator
-
- EViews Developer
- Posts: 161
- Joined: Wed Sep 17, 2008 10:39 am
Re: Date format using wfsave
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
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
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
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
Who is online
Users browsing this forum: No registered users and 19 guests