23.12.2012 Views

MATLAB Function Reference Volume 1: A - E - Bad Request

MATLAB Function Reference Volume 1: A - E - Bad Request

MATLAB Function Reference Volume 1: A - E - Bad Request

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

datestr<br />

2datestr<br />

Purpose Date string format<br />

Syntax str = datestr(DT,dateform)<br />

str = datestr(DT,dateform,P)<br />

Description The datestr function converts serial date numbers (defined by datenum) and<br />

date vectors (defined by datevec) into date strings.<br />

2-370<br />

str = datestr(DT,dateform) converts a single date vector, or each element of<br />

an array of serial date numbers to a date string. Date strings with<br />

two-character years, e.g., 12-june-12, are assumed to lie within the 100-year<br />

period centered about the current year.<br />

str = datestr(DT,dateform,P) uses the specified pivot year as the starting<br />

year of the 100-year range in which a two-character year resides. The default<br />

pivot year is the current year minus 50 years.<br />

The optional argument dateform specifies the date format of the result.<br />

dateform can be either a number or a string:<br />

dateform (number) dateform (string) Example<br />

0 'dd-mmm-yyyy HH:MM:SS' 01-Mar-2000 15:45:17<br />

1 'dd-mmm-yyyy' 01-Mar-2000<br />

2 'mm/dd/yy' 03/01/00<br />

3 'mmm' Mar<br />

4 'm' M<br />

5 'mm' 03<br />

6 'mm/dd' 03/01<br />

7 'dd' 01<br />

8 'ddd' Wed<br />

9 'd' W<br />

10 'yyyy' 2000

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!