RE:Convertir fechas a números a partir del 1900
Hola
te envio la ayuda de matlab refernte a fechas
>> help datenum
DATENUM Serial date number.
N = DATENUM(S) converts the string or date vector (as defined by
DATEVEC) S into a serial date number. Date numbers are serial days
where 1 corresponds to 1-Jan-0000. If S is a string, it must be in
one of the date formats 0,1,2,6,13,14,15,16,23 as defined by
DATESTR.
Certain formats may not contain enough information to compute a date
number. In those cases, missing values will in general default to 0
for hours, minutes, seconds, will default to January for the month, and
1 for the day of month. The year will default to the current year.
Date strings with 2 character years are interpreted to be within the
100 years centered around the current year.
N = DATENUM(S,PIVOTYEAR) uses the specified pivot year as the
starting year of the 100-year range in which a two-character year
resides. The default pivot year is the current year minus 50 years.
N = DATENUM(S,F) uses the specified date form F to interpret the date string
S during the conversion to a date number N. The date form must be
composed of date format symbols according to Table 2 in DATESTR help.
See DATENUM(S) above for details. Formats with 'Q' are not accepted by
datenum.
N = DATENUM(S,F,P) or N = DATENUM(S,P,F) uses the specified date form F and
the pivot year P to determine the date number N, given the date string S.
The input can be a one-dimensional (row or column) string array or
cell array of strings; the resulting output is a column vector of date
numbers.
N = DATENUM(Y,M,D) and N = DATENUM([Y,M,D]) return the serial date
numbers for corresponding elements of the Y,M,D (year,month,day) arrays.
Y, M, and D must be arrays of the same size (or any can be a scalar).
N = DATENUM(Y,M,D,H,MI,S) and N = DATENUM([Y,M,D,H,MI,S]) return the
serial date numbers for corresponding elements of the Y,M,D,H,MI,S
(year,month,day,hour,minute,second) arrays. The six arguments must
be arrays of the same size (or any can be a scalar). Values outside
the normal range of each array are automatically carried to the next
unit (for example month values greater than 12 are carried to years).
Month values less than 1 are set to be 1; all other units can wrap
and have valid negative values.
Examples:
n = datenum('19-May-2000') returns n = 730625.
n = datenum(2001,12,19) returns n = 731204.
n = datenum(2001,12,19,18,0,0) returns n = 731204.75.
n = datenum('19.05.2000','dd.mm.yyyy') returns n = 730625.75.
See also now, datestr, datevec, datetick.
Reference page in Help browser
doc datenum
Saludos
Fismat