Automate

Automate

Make your phone or tablet smarter with automation

Get it on Google Play

dateParts

array dateParts(timestamp, timeZone)

Returns an array with date parts of the timestamp in timeZone.

The returned array contains the following elements:

IndexDesscriptionExample
0Year2014
1Month (0-11)0
2Day in month (1-31)31
3Hour of day (0-23)23
4Minute in hour (0-59)59
5Second in minute (0-59)59
6Millisecond (0-999)123
7Day of week (0-6, sun-sat)0
8Week in year2
9Day in year189
10Daylight savings offset (seconds)3600.0

Note! Months are 0-11, not 1-12.

Parameters

  1. timestampunix timestamp in time zone.
  2. timeZone — optional time zone, default is current time zone.

Returns

Note! This documentation can also be found in the Help & feedback menu of the app.