help-octave
[Top][All Lists]
Advanced

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

Re: problem parsing time out of datetime object


From: Nicholas Jankowski
Subject: Re: problem parsing time out of datetime object
Date: Fri, 20 Oct 2017 20:35:20 -0400



On Oct 20, 2017 7:53 PM, "AG" <address@hidden> wrote:
Maybe I'm missing something but I don't think the underlying representation
is right.

try this:


dt_num = datenum('2013/05/29 00:00:00','yyyy/mm/dd HH:MM:SS')

 dt_num2 = datenum('2013/05/29 00:00:01','yyyy/mm/dd HH:MM:SS')

dt_num>dt_num2  ==> FALSE

Shouldn't this be true?


octave:1> datenum('2013/05/29 00:00:00','yyyy/mm/dd HH:MM:SS')
ans =  735383
octave:2> datenum('2013/05/29 00:00:01','yyyy/mm/dd HH:MM:SS')
ans =    7.3538e+05
octave:3> format long
octave:4> datenum('2013/05/29 00:00:01','yyyy/mm/dd HH:MM:SS')
ans =  735383.000011574

735383.000011574 > 735383  looks right to me


reply via email to

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