MATLAB: How to avoid dates being writen in scientific notation

datestrstr2num

I made my dates using:
m(1,1) = str2num(datestr([2015,8,10,12,0,0],'yyyymmddhhMM'));
which writes date in scientific notation into m. Is there any way to avoid that? I want my dates to be as simple as 201508101200 in m.

Best Answer

If you really want it as an integer:
m = uint64(str2num(datestr([2015,8,10,12,0,0],'yyyymmddhhMM')));