Difference between revisions of "Extensions.DateTime.GetTimeStamp"
Jump to navigation
Jump to search
(20 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
+ | {{DISPLAYTITLE:'''GetTimeStamp '''}}[[Category:DateTime]] | ||
== Classification == | == Classification == | ||
− | {{ClassificationActivity | GetTimeStamp | Returns | + | {{ClassificationActivity | GetTimeStamp | Returns a timestamp in milliseconds | [[Term]] | [[Extensions.DateTime|OTX DateTime Extension]] | - | - | - | Yes}} |
− | == | + | == OTL Syntax == |
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | <syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | ||
− | + | IntegerTerm DateTime.GetTimestamp(); | |
</syntaxhighlight> | </syntaxhighlight> | ||
== Description == | == Description == | ||
'''GetTimestamp''' shall return a timestamp, expressed in milliseconds elapsed since 1970-01-01 00:00:00 UTC. | '''GetTimestamp''' shall return a timestamp, expressed in milliseconds elapsed since 1970-01-01 00:00:00 UTC. | ||
+ | |||
+ | {{TermReturnValue| [[Core.DataTypes.SimpleDataType.Integer|Integer]] | This result returns a timestamp in milliseconds.}} | ||
== Properties == | == Properties == | ||
− | + | * NONE | |
− | |||
− | |||
− | |||
− | == Examples == | + | == OTL Examples == |
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | <syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | ||
− | + | /// Local Declarations | |
+ | |||
+ | Integer Timestamp; | ||
+ | String myCurrentTimeString; | ||
+ | |||
+ | /// Flow | ||
+ | |||
+ | Timestamp = DateTime.GetTimestamp(); | ||
+ | myCurrentTimeString = DateTime.FormatDate(Timestamp, "YYYY-MM-dd HH:mm:ss"); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
== See also == | == See also == | ||
− | [[ | + | [[Extensions.DateTime.FormatDate|FormatDate]]<br/> |
− | [[ | + | [[Extensions.DateTime.FormatDuration|FormatDuration]] |
Latest revision as of 05:43, 1 November 2018
Contents
Classification
Name | GetTimeStamp |
Short Description | Returns a timestamp in milliseconds |
Class | Term |
Extension | OTX DateTime Extension |
Group | - |
Exceptions | - |
Checker Rules | - |
Standard Compliant | Yes |
OTL Syntax
IntegerTerm DateTime.GetTimestamp();
Description
GetTimestamp shall return a timestamp, expressed in milliseconds elapsed since 1970-01-01 00:00:00 UTC.
Return Value
The Term returns the value, see table below.
![]()
In OTX, Terms are categorized according to its return data type!
Data Type | Description |
Integer | This result returns a timestamp in milliseconds. |
Properties
- NONE
OTL Examples
/// Local Declarations
Integer Timestamp;
String myCurrentTimeString;
/// Flow
Timestamp = DateTime.GetTimestamp();
myCurrentTimeString = DateTime.FormatDate(Timestamp, "YYYY-MM-dd HH:mm:ss");