|
Scientific Data Formats: Common Data Format |
|
The CDF_ENCODE_EPOCH function encodes a CDF_EPOCH variable into a string. Four different string formats are available. The default (EPOCH=0) is the standard CDF format, which may be parsed by the CDF_PARSED_EPOCH function or broken down with the CDF_EPOCH procedure.
Result = CDF_ENCODE_EPOCH(Epoch [, EPOCH={0 | 1 | 2 | 3}] )
Returns a string containing the encoded CDF_EPOCH variable.
The double-precision CDF_EPOCH value to be encoded. For more information about CDF_EPOCH values, see "Data Types" in the CDF User's Guide.
Set this keyword equal to one of the following integer values, specifying the epoch mode to use for output of the epoch date string:
|
Value
|
Date Format
|
|---|---|
|
0
|
DD-Mon-YYYY hh:mm:ss.ccc(This is the default)
|
|
1
|
YYYYMMDD.ttttttt
|
|
2
|
YYYYMMDDhhmmss
|
|
3
|
YYYY-MM-DDThh:mm:ss.cccZ(The characters T and Z are the CDF_EPOCH type 3 place holders)
|
where:
epoch_string = '04-Dec-1995 20:19:18.176' epoch = CDF_PARSE_EPOCH(epoch_string) HELP, epoch_string, epoch ; Create encode strings: encode0 = CDF_ENCODE_EPOCH(epoch, EPOCH=0) encode1 = CDF_ENCODE_EPOCH(epoch, EPOCH=1) encode2 = CDF_ENCODE_EPOCH(epoch, EPOCH=2) encode3 = CDF_ENCODE_EPOCH(epoch, EPOCH=3) ; Compare encoding formats: HELP, encode0, encode1, encode2, encode3