[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: problem parsing time out of datetime object
From: |
AG |
Subject: |
Re: problem parsing time out of datetime object |
Date: |
Sun, 22 Oct 2017 11:27:34 -0700 (MST) |
Thanks to everyone for helping me with this. Bottom line: I figured out my
problem. Not sure if it is a bug, documentation, or user error though.
It all stems from me trying to just get a time ONLY object so I can compare
times (e.g. 9:30 vs 16:00). Forget the funky datestr issue for a sec.
I wanted to create a time ONLY datenum. Flooring the the datenum gets me a
datevec that makes sense to me - no real date but time is good. You can see
the datevec has a neg year.
I had assumed that creating a datenum using a time string would produce a
similar datevec but it puts in a real date...that was my problem.
datevec(rem(datenum('00:00:00',13),1))
ans =
-1 12 31 0 0 0
VERSUS
datevec('00:00:00')
ans =
2017 1 1 0 0 0
datevec(datenum('00:00:00',13))
ans =
2017 1 1 0 0 0
--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html
- problem parsing time out of datetime object, AG, 2017/10/20
- problem parsing time out of datetime object, AG, 2017/10/20
- Re: problem parsing time out of datetime object, PhilipNienhuis, 2017/10/20
- Re: problem parsing time out of datetime object, Nicholas Jankowski, 2017/10/20
- Re: problem parsing time out of datetime object, PhilipNienhuis, 2017/10/20
- Re: problem parsing time out of datetime object, Nicholas Jankowski, 2017/10/20
- Re: problem parsing time out of datetime object, AG, 2017/10/20
- Re: problem parsing time out of datetime object, Nicholas Jankowski, 2017/10/20
- Re: problem parsing time out of datetime object, Thomas D. Dean, 2017/10/21
- Re: problem parsing time out of datetime object, Andreas Weber, 2017/10/21
- Re: problem parsing time out of datetime object,
AG <=