cdflib.computeEpoch

Convert time value to CDF_EPOCH value

Syntax

epoch = cdflib.computeEpoch(timeval)

Description

epoch = cdflib.computeEpoch(timeval) converts the time value specified by timeval into a CDF_EPOCH value.

Input Arguments

timeval

7-by-1 time vector. The following table describes the time components.

ComponentDescription
yearAD e.g. 1994
month1–12
day1–31
hour0–23
minute0–59
second0–59
millisecond0–999

Output Arguments

epoch

MATLAB® double representing a CDF_EPOCH time value.

Examples

Convert a time value into a CDF_EPOCH value.

timeval = [1999 12 31 23 59 59 0];
epoch = cdflib.computeEpoch(timeval);

References

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

To use this function, you must be familiar with the CDF C interface. Read the CDF documentation at the CDF Web site.

For copyright information, see the cdfcopyright.txt file.

Was this topic helpful?