I have corrected the format my problem is i need to compare dates,
like 02/01/2003 > 01/01/2003. i have tried datenum but the numbers u
get cant be compared in this manner cause i get the following
734655 for 30/01/2009
734140 for 13/02/2009
733806 for 02/02/2009
here clearly in numbers 734655 for 30/01/2009 > 734140 for 13/02/2009
which is not the case. my code for this conversion is as follows:
in=find(stocksDates(:,1));
no=max(in);
V=num2str(stocksDates(1:no,1));
dtYear=V(1:no,1:4);
dtMonth=V(1:no,5:6);
dtDay=V(1:no,7:8);
sepDate(1:no,1)='/';
correctDate=[dtDay,sepDate,dtMonth,sepDate,dtYear];
dtev=datevec(correctDate);
dtnum=datenum(dtev);
i use no=max(in); and in=find(stocksDates(:,1)); because i dont have
the same data for all stocks i.e. some stocks have more data hence
more dates and some have less. i want to get stock data for all stocks
(about 102) in a certain range (01/01/2003 to say 01/01/2009) and drop
out stocks that do not have data in this range. therefore i need to
compare dates.
Urgent help would really be appriciated.