Re: read date from xls file

przemek klosowski via Help-octave <[email protected]> Tue, 31 Aug 2021 16:45:35 -0400
Newsgroups gmane.comp.gnu.octave.general
Message-ID <[email protected]>
On 8/31/21 11:40 AM, george brida wrote:
>
> I have a xlsx file called gffft (attached) containing two columns: the 
> first a date column under the format mm/dd/yyyy and the second column 
> is reserved for the values of a series.  I would like to read the date 
> column and plot the series where the x-axis is the date column but 
> rather in the following format: dd-mmm-yyyy.
>
https://octave.discourse.group/t/convert-date-to-number-from-excel/194/3

You will probably need to load (and maybe install beforehand) the IO 
package to use xlsread(), but it seems to read your data.

As Doug says above, the XLS dates use a different epoch than Octave, so 
you need to add 693960, and then you can print them out by using datestr()

datestr(31959+693960,'dd-mmm-yyyy')
ans = 01-Jul-1987


----------
We are transitioning to a web based forum
for community help discussions at
https://octave.discourse.group/c/help