Description
Returns a formatted string representing an epoch in time. The format string formatSpecificationcan 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 calling Variable Epoch is assumed to be in TAI, the String is returned in UTC.
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)
|
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.
|
Return Value
Returns a formatted string representing an epoch in time.
Syntax
myString1 = myVariable1.EpochFormat(myString2);
|
For a Spacecraft at epoch 09 January 2007, 15:06, UTC:
Spacecraft1.Epoch = "09 January 2007, 15:06".EpochScan("DD Mmmm YYYY, hh:mm");
Variable ShiftedEpoch;
ShiftedEpoch = Spacecraft1.Epoch + 1;
Report ShiftedEpoch.EpochFormat("**Date is: **D Mmmm YY **at time** h12:mm am/pm");
|
Output Report:
Date is: 10 January 07 at time 3:06 pm
|
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
|