Difference between revisions of "Extensions.DateTime.GetTimeStamp"

From emotive
Jump to navigation Jump to search
Line 12: Line 12:
 
'''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| [[Integer]] | This result returns a timestamp in milliseconds.}}
+
{{TermReturnValue| [[Core.DataTypes.SimpleDataType.Integer|Integer]] | This result returns a timestamp in milliseconds.}}
  
 
== OTL Examples ==
 
== OTL Examples ==
Line 26: Line 26:
  
 
== See also ==
 
== See also ==
[[FormatDate]]<br/>
+
[[Extensions.DateTime.FormatDate|FormatDate]]<br/>
[[FormatDuration]]
+
[[Extensions.DateTime.FormatDuration|FormatDuration]]

Revision as of 04:26, 17 February 2016

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

Integer time;
time = 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.

Icons Note.png In OTX, Terms are categorized according to its return data type!
Data Type Description
Integer This result returns a timestamp in milliseconds.

OTL Examples

// Return a string of the current data/time
Integer timestamp;
String myCurrentTimeString;

timestamp = DateTime.GetTimestamp();
// returns the String "2014-07-12 16:18:03"
myCurrentTimeString = DateTime.FormatDate(timestamp, "YYYY-MM-dd HH:mm:ss");

See also

FormatDate
FormatDuration