LTPDA_REFORMAT_DATE reformats the input date of the (preferred) form 'yyyy-mm-dd HH:MM:SS' to the format 'mm-dd-yyyy HH:MM:SS' which works with datenum. usage: s = ltpda_reformat_date(si) example: >> dnum = datenum(ltpda_reformat_date('2007-05-04 22:34:22')); M Hewitson 03-06-07 $Id: ltpda_reformat_date.html,v 1.2 2007/07/10 05:37:13 hewitson Exp $
0001 function s = ltpda_reformate_date(s) 0002 % LTPDA_REFORMAT_DATE reformats the input date of the (preferred) form 0003 % 'yyyy-mm-dd HH:MM:SS' to the format 'mm-dd-yyyy HH:MM:SS' which works 0004 % with datenum. 0005 % 0006 % usage: s = ltpda_reformat_date(si) 0007 % 0008 % example: >> dnum = datenum(ltpda_reformat_date('2007-05-04 22:34:22')); 0009 % 0010 % M Hewitson 03-06-07 0011 % 0012 % $Id: ltpda_reformat_date.html,v 1.2 2007/07/10 05:37:13 hewitson Exp $ 0013 % 0014 0015 % reformt string to stupid matlab format MM-DD-YYY 0016 s=strcat(s(6:10),'-',s(1:4),s(11:length(s))); 0017 0018