Description
Returns a formatted string representing an epoch in time. The format string formatSpecification can include the date and time formats shown in the "Parsing Dates and Times" reference in the Help File, including month, day, year, hours, minutes, and seconds. The conversion string timeFrameConversion specifies the time system conversion that is applied. For example, for a calling Variable Epoch in TAI, and an output String in UT1 time, the timeFrameConversion would be "TAI-UT1".
Timing Precision Mode
This page describes functionality in millisecond timing precision mode. Millisecond timing precision mode is deprecated and will be removed in a future release. We recommend that you migrate your Mission Plans to nanosecond timing precision mode.
Method Signature
Variable.EpochFormat(
|
String formatSpecification,
|
|
String timeFrameConversion)
|
Arguments
formatSpecification
|
|
Description:
|
Specifies the format of the output String. The format specification can include the date and time formats shown in the "Parsing Dates and Times" reference in the Help File, including month, day, year, hours, minutes, and seconds. The user can also include custom characters by surrounding them with **asterisks**. If a format string is not specified, the format "Mmm DD YYYY hh:mm:ss.fs" will be used.
|
timeFrameConversion
|
|
Description:
|
Specifies the time system to convert to. If only one time system is specified (e.g., "UT1"), then "UTC-" is prepended to the conversion string (e.g., "UTC-UT1").
|
Valid Values:
|
Value
|
Label
|
"TAI"
|
TAI
|
"UT1"
|
UT1
|
"UTC"
|
UTC
|
"UTC-UTC"
|
UTC-UTC
|
"UTC-TAI"
|
UTC-TAI
|
"UTC-UT1"
|
UTC-UT1
|
"TAI-TAI"
|
TAI-TAI
|
"TAI-UT1"
|
TAI-UT1
|
"TAI-UTC"
|
TAI-UTC
|
"UT1-UT1"
|
UT1-UT1
|
"UT1-TAI"
|
UT1-TAI
|
"UT1-UTC"
|
UT1-UTC
|
|
Return Value
Returns a formatted string representing an epoch in time.
Syntax
myString1 = myVariable1.EpochFormat(myString2, myString3);
|
The following example uses the EpochFormat Function to convert the date "Apr 26 2007 00:00:00.000" to the following format: " D Mmmm YY at time hh12:mm am/pm".
Spacecraft1.Epoch = "Apr 26 2007 00:00:00.000".EpochScan();
Report Spacecraft1.EpochFormat("**Date is: **D Mmmm YY **at time** h12:mm am/pm", "UTC");
|
Output Report:
Date is: 26 April 07 at time 12:00 am
|
Note: EpochFormat allows you to embed text within the date and time format using **asterisks**
|
See also
Variable Object
Variable.EpochFormat
Parsing Dates and Times
Matrix, Array, and Variable Math Guide
|