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

Excel serial date number to MATLAB serial date number.

Syntax

Arguments

xd
Excel serial date number. A vector or scalar.
dsys
Excel date system. A vector or scalar.
0 = 1900 date system (default), in which 1 = January 1, 1900 A.D.
1 = 1904 date system, in which 0 = January 1, 1904 A.D.
Vector arguments must have consistent dimensions.

Description

d = x2mdate(xd, dsys) converts Excel serial date numbers xd to MATLAB serial date numbers d. MATLAB date numbers start with 1 = January 1, 0000 A.D., hence there is a difference of 693960 relative to the 1900 date system, or 695422 relative to the 1904 date system. This function is useful with MATLAB Excel Link.

Example

Given Excel date numbers in the 1904 system

convert them to MATLAB date numbers

and then to date strings:

See Also

datenum, datestr, m2xdate



[ Previous | Help Desk | Next ]