Main Content

cdflib.epochBreakdown

Convert CDF_EPOCH value to time value

Syntax

timeVec = cdflib.epochBreakdown(epochTime)

Description

timeVec = cdflib.epochBreakdown(epochTime) converts a CDF_EPOCH value to a time vector. timeVec is a 7-by-n array, where n is the number of CDF_EPOCH values.

This table describes the time value components.

timeVec ElementDescriptionValid Values
timeVec(1,:)Year CENonnegative integer (for example, 1994)
timeVec(2,:)Month1–12
timeVec(3,:)Day1–31
timeVec(4,:)Hour0–23
timeVec(5,:)Minute0–59
timeVec(6,:)Second0–59
timeVec(7,:)Millisecond0–999

Examples

Convert a CDF_EPOCH value to a time value.

% First convert a time vector into a CDF_EPOCH value
timeVal = [1999 12 31 23 59 59 0];
epochTime = cdflib.computeEpoch(timeVal);

% Convert the CDF_EPOCH value into a time vector
timeVec = cdflib.epochBreakdown(epochTime)
timeVec =

        1999
          12
          31
          23
          59
          59
           0

References

This function corresponds to the CDF library C API routine EPOCHbreakdown.

To use this function, you must be familiar with the CDF C interface. You can access the CDF documentation at the CDF website.