Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Introduction

English
The Date Formatter allows you to transform the existing date format to another date format for datalist display.

...

Date Formatter Properties

Configure Date Formatter

Image Added

NameDescription
Date stored in UTC timezoneClick this checkbox if you are storing dates in UTC timezone in database.
Data Date Format
In

Set to follow your Joget System Settings > System Date Format, for example "dd-MM-yyyy hh:mm aa".

Use the Java date format.

e.g.,

(Example: "yyyy-MM-dd" for "2011-06-

01
Please see simpleDateFormat

11")
Read the Date Format Pattern Syntax documentation for a list of date formats you can use.

Display Date Format
In

Use Java date format.

e.g.,

 (Example: "dd/MM/yyyy" for

01/06/2001

"11/06/2011")
Read the Date Format Pattern Syntax documentation for a list of date formats you can use.

When this field is left empty, the following will be considered.

  1. If current locale starts with "zh", the format will be set as "yyyy-MM-dd".
  2. If "Using Locate Date Format" is set in General Settings, date format based on current user's locale will be used.
  3. Otherwise, it will use "MM/dd/yyyy".

Sample Usage

In this example, we will format the column "Date Created" (dateCreated in the database table) to another date format in Datalist Builderdatalist builder.

Image Modified

Figure 2: SQL client view on a data table

The Data Date Format that we should set should be based on the datalist preview from the Datalist Builder itselfdatalist builder.

In Joget Workflow v5, it may This may also be subjected to the system locale and date format attributes set in the System Settings. (Please see General Settings - Server Locale and Time Zone for more information)

Image Modified

Figure 3: Datalist Builder list view without Date Formatter

In this exampleIn this example, without the use of Date Formatter, the Data Date Format would be in Java date format of "dd-MM-yyyy hh:mm aa".

Image Removed

Figure 4: Date Formatter properties

Image Removed

Image Added

With the use of the Date Formatter, we will change the Display Date Format to Java date format of "hh:mm aa dd/MM/yyyy".

Do note that this setting does NOT change the actual formatting of the date, but merely on how the date is displayed.

Image Added

After then, you can see the result of this configuration in datalist preview and runtime.

Demo App


 

 

 Figure 5: Datalist Builder list view with Date Formatter enabled on Date Created column