The CDF_EPOCH procedure computes or breaks down CDF_EPOCH values in a Common Data Format file. When computing an epoch, any missing value is considered to be set to zero.

If you supply a value for the Epoch argument and set the BREAKDOWN_EPOCH keyword, CDF_EPOCH will compute the values of the Year , Month , Day , etc. and insert the values into the named variables you supply. If you specify the Year (and optionally, the Month , Day , etc.) and set the COMPUTE_EPOCH keyword, CDF_EPOCH will compute the epoch and place the value in the named variable supplied as the Epoch parameter.

Calling Sequence

CDF_EPOCH, Epoch, Year [, Month, Day, Hour, Minute, Second, Milli]



The Epoch value to be broken down, or a named variable into which the computed epoch will be placed.

The Epoch value is the number of milliseconds since 01-Jan-0000 00:00:00.000


The year (e.g., 1992) or a named variable.


The month (1-12) or a named variable. You can also set the Month argument equal to zero, in which case the Day argument can take on any value between 1-366; this number is interpreted as the "Day of the Year" rather than a "Day of the Month".


The day (1-31) or a named variable. If the Month argument is set equal to zero, Day can be set to any value between 1-366.


The hour (0-23) or a named variable.


The minute (0-59) or a named variable.


The second (0-59) or a named variable.


The millisecond (0-999) or a named variable. If Hour , Minute , and Second are all set equal to zero, Milli is interpreted as the "Millisecond of the Day" and can be any value between 0-86400000.



If this keyword is set, Epoch is a value which will broken down and the resulting Year, Month, Day, etc. are returned in the remaining parameters which must be named variables.


If this keyword is set, Epoch is a named variable into which the epoch is placed and the other parameters are values which will be used to compute the epoch.


To compute the epoch value of Septmber 20, 1992 at 3:00 am:

CDF_EPOCH, MergeDate, 1992, 9, 20, 3, /COMPUTE_EPOCH

To break down the given epoch value into standard date components:

CDF_EPOCH, 4.7107656e13, yr, mo, dy, hr, mn, sc, milli, /BREAK