Difference between revisions of "Extensions.DateTime.GetTimeStamp"

From emotive
Jump to navigation Jump to search
Line 19: Line 19:
 
== Examples ==
 
== Examples ==
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
java.util.Date.getTime();
+
// Return a string of the current data/time
 +
Integer timestamp = GetTime();
 +
String myCurrentTimeString = FormatDate(timestamp, "YYYY-MM-dd HH:mm:ss");
 +
// returns the String "2014-07-12 16:18:03"
 
</syntaxhighlight>
 
</syntaxhighlight>
  

Revision as of 14:19, 12 July 2014

Classification

Name GetTimeStamp
Short Description Returns a timestamp in milliseconds
Class Term
Extension OTX DateTime Extension
Group -
Exceptions -
Checker Rules -
Standard Compliant Yes

Pseudo-Code Syntax

Integer timeStamp = GetTimeStamp();

Description

GetTimestamp shall return a timestamp, expressed in milliseconds elapsed since 1970-01-01 00:00:00 UTC.

Properties

Name Data Type Class Default Cardinality Description
Result Integer Value - [0..1] This result returns a timestamp in milliseconds.

Examples

// Return a string of the current data/time
Integer timestamp = GetTime();
String myCurrentTimeString = FormatDate(timestamp, "YYYY-MM-dd HH:mm:ss");
// returns the String "2014-07-12 16:18:03"

See also

FormatDate
FormatDuration