Skip to content

Clock

Non-Visible component
Category Requires Version
Sensors API 19, Android 4.4 - 4.4.4 KitKat 4

Overview

Non-visible component that provides the instant in time using the internal clock on the phone. It can fire a timer at regularly set intervals and perform time calculations, manipulations, and conversions.

Methods to convert an instant to text are also available. Acceptable patterns are empty string, MM/DD/YYYY HH:MM:ss a, or MMM d, yyyyHH:mm. The empty string will provide the default format, which is "MMM d, yyyy HH:MM:ss a" for FormatDateTime "MMM d, yyyy" for FormatDate. To see all possible format, please see here.

Events

Timer

Timer has gone off.

Methods

Add Days

Returns: Instantintime

An instant in time some days after the argument

Params
instant Instantintime
quantity Number

Add Duration

Returns: Instantintime

An instant in time some duration after the argument

Params
instant Instantintime
quantity Number

Add Hours

Returns: Instantintime

An instant in time some hours after the argument

Params
instant Instantintime
quantity Number

Add Minutes

Returns: Instantintime

An instant in time some minutes after the argument

Params
instant Instantintime
quantity Number

Add Months

Returns: Instantintime

An instant in time some months after the argument

Params
instant Instantintime
quantity Number

Add Seconds

Returns: Instantintime

An instant in time some seconds after the argument

Params
instant Instantintime
quantity Number

Add Weeks

Returns: Instantintime

An instant in time some weeks after the argument

Params
instant Instantintime
quantity Number

Add Years

Returns: Instantintime

An instant in time some years after the argument

Params
instant Instantintime
quantity Number

Day Of Month

Returns: Number

The day of the month

Params
instant Instantintime

Duration

Returns: Number

Milliseconds elapsed between instants

Params
start Instantintime
end Instantintime

Duration To Days

Returns: Number

convert duration to days

Params
duration Number

Duration To Hours

Returns: Number

convert duration to hours

Params
duration Number

Duration To Minutes

Returns: Number

convert duration to minutes

Params
duration Number

Duration To Seconds

Returns: Number

convert duration to seconds

Params
duration Number

Duration To Weeks

Returns: Number

convert duration to weeks

Params
duration Number

Format Date

Returns: Text

Text representing the date of an instant in the specified pattern

Params
instant Instantintime
pattern Text

Format Date Time

Returns: Text

Text representing the date and time of an instant in the specified pattern

Params
instant Instantintime
pattern Text

Format Time

Returns: Text

Text representing the time of an instant

Params
instant Instantintime

Get Millis

Returns: Number

The instant in time measured as milliseconds since 1970.

Params
instant Instantintime

Hour

Returns: Number

The hour of the day

Params
instant Instantintime

Make Date

Returns: Instantintime

Allows the user to set the clock to be a date value Valid values for the month field are 1-12 and 1-31 for the day field.

Params
year Number
month Number
day Number

Make Instant

Returns: Instantintime

An instant in time specified by MM/dd/YYYY hh:MM:ss or MM/dd/YYYY or hh:mm

Params
from Text

Make Instant From Millis

Returns: Instantintime

An instant in time specified by the milliseconds since 1970.

Params
millis Number

Make Instant From Parts

Returns: Instantintime

Allows the user to set the date and time to be displayed when the clock opens Valid values for the month field are 1-12 and 1-31 for the day field.

Params
year Number
month Number
day Number
hour Number
minute Number
second Number

Make Time

Returns: Instantintime

Allows the user to set the time of the clock - Valid format is hh:MM:ss

Params
hour Number
minute Number
second Number

Minute

Returns: Number

The minute of the hour

Params
instant Instantintime

Month

Returns: Number

The month of the year represented as a number from 1 to 12)

Params
instant Instantintime

Month Name

Returns: Text

The name of the month

Params
instant Instantintime

Now

Returns: Instantintime

The current instant in time read from phone's clock

Second

Returns: Number

The second of the minute

Params
instant Instantintime

System Time

Returns: Number

The phone's internal time

Weekday

Returns: Number

The day of the week represented as a number from 1 (Sunday) to 7 (Saturday)

Params
instant Instantintime

Weekday Name

Returns: Text

The name of the day of the week

Params
instant Instantintime

Year

Returns: Number

The year

Params
instant Instantintime

Properties

Timer Always Fires

Boolean Default: True ➖ Read Write - Designer Blocks

Will fire even when application is not showing on the screen if true

Timer Enabled

Boolean Default: True ➖ Read Write - Designer Blocks

Fires timer if true

Timer Interval

Number Default: 1000 ➖ Read Write - Designer Blocks

Interval between timer events in ms


Last update: January 27, 2020