[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: octave datevec() v/s Excel/LibreOffice
From: |
Mike Miller |
Subject: |
Re: octave datevec() v/s Excel/LibreOffice |
Date: |
Mon, 29 Sep 2014 11:07:35 -0400 |
On Mon, Sep 29, 2014 at 10:45:41 -0400, jmb wrote:
> Hello,
>
> I am finding a difference between how octave interprets a serial date to
> a date string versus what LibreOffice/MS-Excel show:
>
> A. LibreOffice / MS-Excel:
> '41908.402198066' -> 09/26/2014 09:39:10 (which is correct)
> B. Octave:
> datevec(41908.402198066)
> ans =
> 114.0000 9.0000 27.0000 9.0000 39.0000 9.9129
>
> (Tested in Octave 3.2.4 & 3.8.1 running in 64bit Ubuntu 12.04+)
>
> I assume that 114 means 2014, but why do I get 27th instead of the
> correct 26Sep2014? What am I doing wrong or missing? Any help would be
> appreciated. Thank you.
Hi JMB, you'll probably find the m2xdate function helpful:
http://octave.sourceforge.net/financial/function/m2xdate.html
HTH,
--
mike