Difference between revisions of "Extensions.DateTime.FormatDuration"
Jump to navigation
Jump to search
Line 11: | Line 11: | ||
FormatDuration returns a specified duration in milliseconds as a string representation. Formatting will be made to the format of Date Term, with the difference that the milliseconds elapsed interpreted as a duration, not the date Analog. | FormatDuration returns a specified duration in milliseconds as a string representation. Formatting will be made to the format of Date Term, with the difference that the milliseconds elapsed interpreted as a duration, not the date Analog. | ||
− | {{TermReturnValue| [[String]] | A formatted time.}} | + | {{TermReturnValue| [[Core.DataTypes.SimpleDataType.String|String]] | A formatted time.}} |
== Properties == | == Properties == | ||
{| {{TableHeader}} | {| {{TableHeader}} | ||
{{TableRowPropertiesHeader}} | {{TableRowPropertiesHeader}} | ||
− | {{TableRowPropertie1| Timestamp | [[Integer]] | [[Term]] | - | [0..1] | This property represents a duration in milliseconds to a string that is formatted according to the specified rules.}} | + | {{TableRowPropertie1| Timestamp | [[Core.DataTypes.SimpleDataType.Integer|Integer]] | [[Term]] | - | [0..1] | This property represents a duration in milliseconds to a string that is formatted according to the specified rules.}} |
− | {{TableRowPropertie2| Pattern | [[String]] | [[Term]] | - | [0..1] | User-specified format for displaying the time.}} | + | {{TableRowPropertie2| Pattern | [[Core.DataTypes.SimpleDataType.String|String]] | [[Term]] | - | [0..1] | User-specified format for displaying the time.}} |
|} | |} | ||
Line 27: | Line 27: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
== See also == | == See also == | ||
− | [[GetTimeStamp]] <br/> | + | [[Extensions.DateTime.GetTimeStamp|GetTimeStamp]] <br/> |
− | [[FormatDate]] | + | [[Extensions.DateTime.FormatDate|FormatDate]] |
Revision as of 04:29, 17 February 2016
Contents
Classification
Name | FormatDuration |
Short Description | Give a duration in milliseconds from a time stamp. |
Class | Term |
Extension | OTX DateTime Extension |
Group | - |
Exceptions | OutOfBoundsException |
Checker Rules | - |
Standard Compliant | Yes |
OTL Syntax
StringTerm = FormatDuration(IntegerTerm, StringTerm);
Description
FormatDuration returns a specified duration in milliseconds as a string representation. Formatting will be made to the format of Date Term, with the difference that the milliseconds elapsed interpreted as a duration, not the date Analog.
Return Value
The Term returns the value, see table below.
![]()
In OTX, Terms are categorized according to its return data type!
Data Type | Description |
String | A formatted time. |
Properties
Name | Data Type | Class | Default | Cardinality | Description |
Timestamp | Integer | Term | - | [0..1] | This property represents a duration in milliseconds to a string that is formatted according to the specified rules. |
Pattern | String | Term | - | [0..1] | User-specified format for displaying the time. |
OTL Examples
String CurrentTime;
CurrentTime = DateTime.FormatDuration(1000, "S,s");