view m-toolbox/classes/+utils/@timetools/reformat_date.m @ 17:7afc99ec5f04
database-connection-manager
Update ao_model_retrieve_in_timespan
author
Daniele Nicolodi <nicolodi@science.unitn.it>
date
Mon, 05 Dec 2011 16:20:06 +0100 (2011-12-05)
parents
f0afece42f48
children
line source
+ − % REFORMAT_DATE reformats the input date
+ − %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ − %
+ − % DESCRIPTION: 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.
+ − %
+ − % CALL: s = reformat_date(si)
+ − %
+ − % INPUTS: si - date string in the format 'yyyy-mm-dd HH:MM:SS'
+ − %
+ − % OUTPUTS: s - date string in the format 'mm-dd-yyyy HH:MM:SS'
+ − %
+ − % EXAMPLE: dnum = datenum(reformat_date('2007-05-04 22:34:22'));
+ − %
+ − % VERSION: $Id: reformat_date.m,v 1.1 2008/08/05 18:07:59 ingo Exp $
+ − %
+ − % HISTORY: 03-06-2007 M Hewitson
+ − % Creation
+ − %
+ − %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ −
+ − function s = reformat_date (s)
+ −
+ − % reformt string to stupid matlab format MM-DD-YYY
+ − s=strcat(s(6:10),'-',s(1:4),s(11:length(s)));
+ −
+ − end