The CDF_ENCODE_TT2000 function encodes a single value or an array of CDF_TIME_TT2000 value(s) into the standard date and time character string(s). The default format of the string is ISO 8601 format:

yyyy-mm-ddThh:mm:ss.cccuuunnn 

Examples


epoch_string = '2005-12-04T20:19:18.176321123'
epoch = CDF_PARSE_TT2000(epoch_string)
PRINT, CDF_ENCODE_TT2000(epoch)
 
CDF_TT2000, epoch2, 2005, 12, 4, 20, 19, 18, 176, 321, /compute
PRINT, CDF_ENCODE_TT2000(epoch2, epoch=0)
 

IDL Output

2005-12-04T20:19:18.176321123
04-Dec-2005 20:19:18.176321123

Syntax


Result = CDF_ENCODE_TT2000(Epoch [, EPOCH={0 | 1 | 2 | 3}] )

Return Value


Returns a string containing the CDF_TIME_TT2000 values.

Arguments


Epoch

A scalar or an array (<=2D) of CDF_TIME_TT2000 values.

Keywords


EPOCH

Set this keyword equal to one of the following values, specifying the epoch mode to use for output of the epoch string:

Value

Date Format

0

DD-MM-YYYY hh:mm:ss.ccccccccc
(This is the default)

1

YYYYMMDD.ttttttt

2

YYYYMMDDss

3

YYYY-MM-DDThh:mm:ss.ccccccccc
( T is a CDF_EPOCH type 3 placeholder)

where:

Date Element

Represents

DD

the day of the month (1-31)

MM

the month number (1-12)

YYYY

the year (A.D.)

hh

the hour (0-23)

mm

the minute (0-59)

ss

the second (0-59)

ccc

the millisecond (0-999), microsecond (000-999) and nanosecond (000-999)

ttttttt

the fraction of the day (e.g. 2500000 is 6 am).

Version History


3.4.0

Introduced

See Also


CDF_PARSE_TT2000, CDF_TT2000