help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

datenum does not understand num2str


From: Kamaraju S Kusumanchi
Subject: datenum does not understand num2str
Date: Sun, 01 Apr 2012 19:52:20 -0400
User-agent: KNode/4.4.11

If this is a bug, I can file it. But just thought I will check here first as 
it seems to be very basic.

Using octave 3.2.4 on Debian Wheezy

$octave -qf
octave:1> datenum('20120401', 'yyyymmdd')
ans =  734960
octave:2> datenum(num2str(20120401), 'yyyymmdd')
error: datevec: date not parsed correctly with given format
error: called from:
error:   /usr/share/octave/3.2.4/m/time/datevec.m at line 140, column 11
error:   /usr/share/octave/3.2.4/m/time/datenum.m at line 75, column 25
octave:2> 

FWIW, the command works under matlab 7.9.1.671 (R2009b) Service Pack 1.

If I am guessing correctly, the format of the output from num2str cannot be 
parsed correctly by datenum. Worth fixing or is there a work around?


thanks
-- 
Kamaraju S Kusumanchi
http://malayamaarutham.blogspot.com/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]