Time functions | calendar >> |
r = addtodate(d, q, f) |
serial datenum.
quantile to add to date
'year', 'month', 'day', 'hour', 'minute', 'second', or 'millisecond.
date number.
r = addtodate(d, q, f) adds quantity q to the indicated date field f of a scalar serial date number d, returning the updated date number r.
t = datenum('07-Apr-2008 23:00:00');datevec(t)
t2 = addtodate(t, -2, 'hour');datevec(t2)
t3 = addtodate(t, 4, 'hour');datevec(t3)
Version | Description |
---|---|
1.0.0 | initial version |
Allan CORNET