Official | HULFT IoT EdgeStreaming Mapper Reference First Edition: July 1, 2021

Date/Time formatting(Standard format)

Date/Time formatting(Standard format)

Logic name

Date/Time formatting(Standard format)

Function

This logic formats the date and time to the selected format.

Data type

Location

Type

First input handler

Date

Logic output

String

Property

Category

Property

Description

Required

Format

Specify an output data format.

Comment

Comment

It does not affect the conversion processing.

Function details

For the date and time format, refer to Date format definition in Points to be noted on operation.

Format

Select a format from the following standard formats:

  • YYYYMMDDThhmmss+0000

  • YYYY-MM-DDThh:mm:ss+00:00

  • YYYY/MM/DD hh:mm:ss

  • MM/DD/YYYY hh:mm:ss

  • DD/MM/YYYY hh:mm:ss

  • hh:mm:ss YYYY/MM/DD

  • hh:mm:ss MM/DD/YYYY

  • hh:mm:ss DD/MM/YYYY

  • Mon MMM DD hh:mm:ss YYYY

  • Mon MM DD hh:mm:ss YYYY

  • YYYY-MM-DD

  • YYYYMMDD

  • YYYY/MM/DD

  • hh:mm:ss

You can add the following options to the standard formats:

  • Add a time zone

  • Output in 12-hour format

  • Add milliseconds

Setting example of format

Setting Example of Format

Output Result

YYYY/MM/DD hh:mm:ss
Add a time zone

2021/01/23 12:34:56 +09:00

YYYY/MM/DD hh:mm:ss
Output in 12-hour format

2021/01/23 12:34:56 PM

YYYY/MM/DD hh:mm:ss
Add milliseconds

2021/01/23 12:34:56.789

YYYY/MM/DD hh:mm:ss
Add a time zone
Output in 12-hour format
Add milliseconds

2021/01/23 12:34:56.789 PM +09:00

= Remarks =

The result is an interpreted date and time data that indicates Japan time 12:34:56.789, January 23, 2021 for the Japanese locale.

Example of logic use

Mapping definition

Logic settings and processing result

This logic outputs the TimeStamp type input data in the specified format.

For the date and time to specify for the input data, use a value that is output from one of the following logics:

  • Current date/time (UTC)

  • Current date/time (OS time zone)

  • Date/Time formatting(Standard format)

  • Date/Time formatting(Custom)

Property settings

Property

Setting Value

Format

YYYY/MM/DD hh:mm:ss

Input data

Date type data that represents the following dates and times

1985-05-11T01:02:03.0040000+09:00

2000-09-01T10:20:30.0400000+09:00

2021-03-17T23:58:59.9990000+09:00

Output data

1985/05/11 01:02:03

2000/09/01 10:20:30

2021/03/17 23:58:59

 

 

Official | HULFT IoT EdgeStreaming Mapper Reference First Edition: July 1, 2021