Code covered by the BSD License  

Highlights from
mdatestr, mdatenum: A simple alternative of datestr and datenum

4.0

4.0 | 1 rating Rate this file 20 Downloads (last 30 days) File Size: 1.58 KB File ID: #29184

mdatestr, mdatenum: A simple alternative of datestr and datenum

by Zhiqiang Zhang

 

29 Oct 2010

the original datestr and datenum are powerful, but slow. The two functions' are limited, but faster.

| Watch this File

File Information
Description

The original datestr and datenum are powerful, but slow.

mdatestr, mdatenum only convert date between string with format 'yyyy-mm-dd' and series value (with Excel type).

They cost 20% time of datestr and datenum(with specific format).

% usage
% mdatenum('2010-10-30') % ans = 734421
% mdatestr(73421) % ans = '2010-10-30'

Acknowledgements

The author wishes to acknowledge the following in the creation of this submission:
DateConvert

MATLAB release MATLAB 7.11 (2010b)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (1)
02 Dec 2010 Brian Emery

Nice submission, easy to use, and easy to modify to do what I needed to do.

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
datetime Zhiqiang Zhang 01 Nov 2010 12:02:51
datenum Zhiqiang Zhang 01 Nov 2010 12:02:51
datestr Zhiqiang Zhang 01 Nov 2010 12:02:51

Contact us at files@mathworks.com