Format Date Activity

Description

Formats a date from an input value and provides various formatted dates that can be used for presentation.

Usage

You may need to format a date input into a specific format. You could display a date supplied from the Date Picker form element in a Display Form activity and format it using the Format Date activity.

Inputs

Date

Required

Type: StringNumber

The date, represented as a number or a string, to format.

For example: "1360017870652" or "2013-02-04T22:44:30.652Z".

Format

Optional

Type: "LT" | "LTS" | "L" | "l" | "LL" | "ll" | "LLL" | "lll" | "LLLL" | "llll" | String

The token used to format the output.

Types identified with the uppercase "L" or the lowercase "l" specify the date and time format based on locale. The lowercase version is a shortened form of its uppercase counterpart.

LT

Time

8:30 PM

LTS

Time with seconds

8:30:25 PM

L

Month numeral, day of month, year

07/06/2017

l

Shortened form of L

7/6/2017

LL

Month name, day of month, year

July 6 2017

ll

Shortened form of LL

Jul 6 2017

LLL

Month name, day of month, year, time

July 6 2017 8:30 PM

lll

Shortened form of LLL

Jul 6 2017 8:30 PM

LLLL

Month name, day of month, day of week, year, time

Thursday, July 6 2017 8:30 PM

llll

Shortened form of LLLL

Thu, Jul 6 2017 8:30 PM

Outputs

formatted

Type: String

The date formatted from the "format" input.

iso

Type: String

The date formatted in the ISO8601 standard.

For example: "2013-02-04T22:44:30.652Z".

local

Type: String

The date formatted as a standard English string in the local time zone.

For example: "Mon Feb 04 2013 14:44:30 GMT-0800".

unix

Type: Number

The number of milliseconds since the Unix Epoch.

For example: "1360017870652".

utc

Type: String

The date formatted as a standard English string using the UTC time zone.

For example: "Mon, 04 Feb 2013 22:44:30 GMT".

Properties

For information about the ID, Display Name, and Description properties, see Properties Common to all Activities.

Connectivity Requirements

This activity works when the device has intermittent connectivity to the network.

Version Information

Supported from: Geocortex Viewer for HTML5 2.9, ArcGIS Web AppBuilder 2.4.