Categories > Date&time > rex_date

Introduction

Get system date and time.

Links


Categories > Date&time > rex_dateIntroductionLinksDependenceUsageGet dateGet delta timeEscaped time

Dependence

None

Usage

Get date

Expression:UnixTimestampExpression:UnixTimestamp(year, month, day)Timestamp (ms)Expression:Year(timestamp)Expression:Month(timestamp)Expression:Date(timestamp)Expression:Day(timestamp) Expression:Hours(timestamp)Expression:Minutes(timestamp)Expression:Seconds(timestamp)Expression:Milliseconds(timestamp)Expression:LocalExpression(unixtimestamp)

Sample capx

  1. Expression:UnixTimestamp, to get current timestamp

    • Expression:UnixTimestamp(year, month, day), to get timestamp at year/month/day
    • Expression:UnixTimestamp(year, month, day, hours, minutes, seconds), to get timestamp at year/month/day/hours/minutes/seconds
  2. Get date

    It is recommended using rex_momentjs to get formatted date string

    • Expression:Year(timestamp)
    • Expression:Month(timestamp)
    • Expression:Date(timestamp)
    • Expression:Day(timestamp)
    • Expression:Hours(timestamp)
    • Expression:Minutes(timestamp)
    • Expression:Seconds(timestamp)
    • Expression:Milliseconds(timestamp)
    • Expression:LocalExpression(unixtimestamp), to get local date expression string (Sample capx)

Or get current date directly by

(not recommended, sample capx)

Get delta time

sample capx

Subtract two timestamp (Expression:UnixTimestamp)


Escaped time

Action:Start----T0 = current timestampExpression:Timer----T1 = current timestamp,Escaped time = (T1 - T0)/1000

Sample capx

  1. Action:Start, to start a timer

  2. Expression:Timer, to get escaped time, in seconds

    • Control

      • Action:Pause
      • Action:Resume