Difference between revisions of "Extensions.DateTime.FormatDate"
Jump to navigation
Jump to search
Line 5: | Line 5: | ||
== OTL Syntax == | == OTL Syntax == | ||
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | <syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | ||
− | String | + | /// Local Declarations |
+ | String StringVariable; | ||
+ | /// Flow | ||
+ | StringVariable = FormatDate(IntegerTerm, StringTerm); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 39: | Line 42: | ||
== OTL Examples == | == OTL Examples == | ||
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | <syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | ||
+ | /// Local Declarations | ||
+ | |||
String CurrentTime; | String CurrentTime; | ||
+ | |||
+ | /// Flow | ||
CurrentTime = DateTime.FormatDate(DateTime.GetTimestamp(), null); | CurrentTime = DateTime.FormatDate(DateTime.GetTimestamp(), null); |
Revision as of 02:30, 24 October 2018
Contents
Classification
Name | FormatDate |
Short Description | Returns a formatted time representation of a timestamp. |
Class | Term |
Extension | OTX DateTime Extension |
Group | - |
Exceptions | OutOfBoundsException |
Checker Rules | - |
Standard Compliant | Yes |
OTL Syntax
/// Local Declarations
String StringVariable;
/// Flow
StringVariable = FormatDate(IntegerTerm, StringTerm);
Description
Date format is a term which converts a timestamp in a date format and returns as a string. If there is no formatting specified, is the time to ISO 8601:2004 in the following format:
YYYY-MM-DDThh:mm:ss[.fff]+hh:mm
(The symbols "-", ".", ":", ",", "+" And "T" are delimiters)
The following table gives an overview of the decoding of the individual format icons.
YYYY | MM | DD | hh | mm | ss | fff | hh | mm |
Year | Month | Day | Hour | Minute | Second | Milisecond | Hour (difference from GMT) | Minute (difference from GMT) |
If the timestamp value is negative, the OutOfBoundsException exception will be thrown.
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 | Date in the form according to ISO8601 or as specified. |
Properties
Name | Data Type | Class | Default | Cardinality | Description |
Timestamp | Integer | Term | - | [1] | This property specifies a date as a time stamp, which is interpreted as the number of milliseconds elapsed since January 1 1970 00:00:00 UTC. |
Pattern | String | Term | - | [0..1] | This feature can represent time in the desired format. |
OTL Examples
/// Local Declarations
String CurrentTime;
/// Flow
CurrentTime = DateTime.FormatDate(DateTime.GetTimestamp(), null);