Skip to content

Overview

Concepts and Principles

Development

Overview

IDEs

API Explorer

Releases

Release Notes

TORO Integrate

Coder Studio

Coder Cloud

Bug Reports

Search

Date Parsing

Introduction

The examples package also includes a couple of services that demonstrate how to create GloopDate objects from a string property, long property, or a java.util.Date object. As you will see in these Gloop examples, the process is as easy as mapping the source value to a GloopDate object either by a map line or through a set expression.

GloopDate property whose value has been set with a _set expression_

Related articles

Please see the following articles for more information:

Try It!

Under the Coder Navigator, expand the examples package entry and navigate to the code folder. Afterwards, look for the dateManipulation package. This package contains four files, shown below:

1
2
3
4
5
6
7
8
9
examples
├── ...
└── code
    ├── ...
    └── dateManipulation
        ├── CustomFormatToGloopDate.gloop
        ├── EpochSecondsToGloopDate.gloop
        ├── JavaDateToGloopDate.gloop
        └── StringToGloopDate.gloop

These services are named after the transformation they demonstrate. Open any of these services and run them to see how GloopDate properties are created out of other property types. Line comments are present to help with understanding these services better.

How It Works...

Gloop will try its best to parse the given value using the supported default date formats. In cases that the date value is not included in the default formats, you can declare the format of the value to be parsed using the Date Formats property. To set a custom date format to be parsed, you can do the following:

  1. Select the GloopDate object.
  2. In the Properties view, click the ellipsis button of the Date Formats property.

    Date Formats property

  3. This will open a dialog where you could put the custom date formats. Once done, click OK.

    _Date Formats_ dialog