Skip to Main Content Skip to Search
Product Documentation

todatenum - Convert CDF epoch object to MATLAB datenum

Syntax

n = todatenum(obj)

Description

n = todatenum(obj) converts the CDF epoch object ep_obj into a MATLAB serial date number. Note that a CDF epoch is the number of milliseconds since 01-Jan-0000 whereas a MATLAB datenum is the number of days since 00-Jan-0000.

Examples

Construct a CDF epoch object from a date string, and then convert the object back into a MATLAB date string:

dstr = datestr(today)
dstr =
   08-Oct-2003

obj = cdfepoch(dstr)
obj =
     cdfepoch object:
     08-Oct-2003 00:00:00

dstr2 = datestr(todatenum(obj))
dstr2 =
   08-Oct-2003

See Also

cdfepoch | cdfinfo | cdfread | cdfwrite | datenum

  


Free MATLAB Interactive Kit

Explore how to use MATLAB to make advancements in engineering and science.


Download free kit

Trials Available

Try the latest version of MATLAB and other MathWorks products.


Get trial software
 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS