Date/Time Formatting

Logic Name

Date/Time Formatting

Function

Outputs the input date/time in the specified format.

Data Types

Location Type
The first input handler Date
Logic output String
lightbulbRefer to "Logic Specifications" for details.

Properties

Category Property Description
Required Format Specify the date format of the custom type.
Comment Comment The comment will also be output to the specifications.It does not affect the conversion process.

Function Details

The date/time formatting uses java.text.SimpleDateFormat.
For further details, refer to "Java(TM) Platform, Standard Edition 8 API Specification (http://docs.oracle.com/javase/8/docs/api/java/text/SimpleDateFormat.html).

Format

Format is used when converting date/time to string.
A-Z and a-z without quotation marks are interpreted as pattern letters. This interpretation can be avoided by enclosing the text with single quotation marks("'"). To avoid the interpretation of single quotation, represent single quotation in double ("''").

Character Description Representation Example
G Era Text AD
y Year Year 1996;96
M Month Month 7
w Week of the year Numeric 27
W Week of the month Numeric 2
D Day of the year Numeric 189
d Day of the month Numeric 10
F Day of the week in the month Numeric 2
E Day of the week Text Wednesday
a AM / PM Text AM
H Hour of day (0 - 23) Numeric 0
k Hour of day (1 - 24) Numeric 24
K Hour in AM/PM (0 - 11) Numeric 0
h Hour in AM/PM (1 - 12) Numeric 12
m Minute Numeric 30
s Second Numeric 55
S Millisecond Numeric 978
z Time zone General time zone Japan Standard Time; JST; GMT+09:00
Z Time zone RFC 822 time zone +0900
Format Notation Example
Format Result
yyyy/MM/dd HH:mm:ss.SSS z 2005/01/23 12:34:56.789 JST
''yy/M/d HHmmssZ '05/1/23 123456+0900
MMMM d, yyyy G (E) January 23, 2005 AD (Sun)
aa K hour m minute s second S millisecond zzzz 0 hour m minute 56 second 789 millisecond PM, Japan Standard Time
HH'h'mm'm'ss's'SSS'ms' 12h34m56s789ms
yyyy-MM-dd'T'HH:mm:ss.SSSZZ 2005-01-23T12:34:56.789+0900
The date/time is Japanese local time 12:34:56.789 January 23, 2005.

Logic Sample

Mapping Definition

Logic Settings and Processing Result

The date/time data is converted to format "yyyy year MM month dd day HH hour mm minute ss second".
Property Settings
Property Setting
Format yyyy year MM month dd day HH hour mm minute ss second
Input Data
1985-05-11T01:02:03.004+0900
2000-09-01T10:20:30.040+0900
2010-10-17T23:58:59.999+0900
Result Data
1985 year 05 month 11 day 01 hour 02 minute 03 second
2000 year 09 month 01 day 10 hour 20 minute 30 second
2010 year 10 month 17 day 23 hour 58 minute 59 second