The CDF_PARSE_TT2000 function parses a single or an array of input strings into an 8-byte integer (LONG64) value(s) for use as a CDF_TIME_TT2000 type variable. CDF_TIME_TT2000 variables may be encoded into a variety of formats using the CDF_ENCODE_EPOCH function or decomposed into date/time components using CDF_TT2000, /BREAKDOWN_EPOCH function.
Examples
test_string = '2005-12-04T20:19:18.176214648'
test_epoch = CDF_PARSE_TT2000(test_string)
CDF_TT2000,test_epoch, year, month, day, hour, min, sec, milli, $
micro, nano,/BREAKDOWN_EPOCH
HELP, test_string, test_epoch
PRINT, CDF_ENCODE_TT2000(test_epoch)
PRINT, year, month, day, hour, min, sec, milli, micro, nano
IDL Output
TEST_STRING STRING = '2005-12-04T20:19:18.176214648'
TEST_EPOCH LONG64 = 186999622360214648
2005-12-04T20:19:18.176214648
2005.0000 12.000000 4.0000000 20.000000 19.000000 18.000000 176.00000 214.00000
648.00000
Syntax
Result = CDF_PARSE_TT2000(Epoch_string)
Return Value
Returns a single value or an array (<= 2D) of 8-byte integer values of the input string(s).
Arguments
Epoch_string
A formatted string that is parsed into a double precision value to be used as a CDF_TIME_TT2000 data type. The format can be one of the predefined formats.
The default format expected by CDF_PARSE_TT2000 is:
yyyy-MM-DDThh:mm:ss.cccuuunnn
where:
Date Element |
Represents |
YYYY |
the year (A.D.) |
MM |
the month number (1-12)
|
DD |
the day of the month (1-31)
|
hh |
the hour (0-23) |
mm |
the minute (0-59)
|
ss |
the second (0-59)
|
ccc |
the millisecond (0-999)
|
uuu |
the microsecond (0-999)
|
nnn |
the nanosecond (0-999)
|
Note: T is a CDF_EPOCH type 3 placeholder. For more information about CDF_EPOCH values, see “Data Types” in the CDF User’s Guide.
Keywords
None
Version History
See Also
CDF_ENCODE_TT2000, CDF_TT2000