Financial Toolbox
  Go to function:
    Search    Help Desk 
daysact    Examples   See Also

Actual number of days between dates.

Syntax

Description

nd = daysact(d1, d2) returns the actual number of days between two dates d1 and d2. Enter dates as serial date numbers or date strings. nd is negative if d2 is earlier than d1.

nd = daysact(d1) returns the actual number of days between the MATLAB base date and date d1. In MATLAB, the base date 1 is 1-Jan-0000 A.D. See datenum for a similar function.

Either input argument can contain multiple values, but if so, the other input must contain the same number of values or a single value that applies to all. For example, if d1 is an N-row character array of date strings, then d2 must be an N-row character array of date strings or a single date. nd is then an N-by-1 vector of numbers.

Examples

See Also

datenum, datevec, days360, days365, daysdif



[ Previous | Help Desk | Next ]