Versions Compared

Key

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

...

NameDescription
Prefixdate
Description

To get date time according to a specified format.

Info
titleLocalization

The returned value would follow current logged in user's timezone. If user's information is not available, then it will use server's timezone.

Attributes
  • #date.dateFormat#
  • #date.dateUnit[+-]integerValue.dateFormat#

  • #date.dateFormat|TZ# A new feature in Joget DX v7.0.8 to display the date time adjusted based on the Coordinated Universal Time (UTC) timezone value (0 to 12), for example, "#date.yyyy-MM-dd HH:mm|5#" will display the current date time based on UTC plus 5 hours. Read Display Date Time Based On UTC.


Info
titleOptions

dateFormat

  • In Java date format; e.g., yyyy-MM-dd for 2011-06-01

dateUnit

  • YEAR
  • MONTH
  • DAY

integerValue

  • Numeric integer value. E.g. 10


  • #date.DATE_FORMAT_TO[INPUT_DATE_VALUE| INPUT_VALUE_FORMAT]#

  • #date.dateUnit[+-]integerValue.DATE_FORMAT_TO[INPUT_DATE_VALUE| INPUT_VALUE_FORMAT]#

Info

INPUT_DATE_VALUE accepts any date value and even nested hash variables, e.g: form data hash variable. See example in sample attributes below.

INPUT_VALUE_FORMAT is the INPUT_DATE_VALUE original format.

DATE_FORMAT_TO defines the format to change to.

The above date hash with format control will use the login user's time zone setting and automatically adjust the date and time. If the user's time zone setting is blank, it wil revert to the System Settings "System Time Zone" property. If you want to perform a date formatting without using the time zone value, download and import the Date Formatter Hash Variable plugin from Joget Marketplace.


Panel
borderColorpurple
bgColorwhite
borderWidth1
titleBGColor#ddccff
borderStylesolid
titleNew Feature

use #dateEN "#dateEN.dateFormat" to force the date to be displayed in English. This is a new feature in DX 8.

Scope of Use
  • All components within the App.
Sample Attributes

#date.h:mm a# // shows current time of 12:08 PM

#dateEN.yyyy-MM-dd# // shows current date of 2023-02-15 in English even though the locale has been set to a different language. (i.e Arabic)

#date.EEE,d MMM yyyy h:mm:ss a# // shows current date time of Wed, 4 Jul 2014 12:08:56 PM

#date.DAY+7.EEE,d MMM yyyy h:mm:ss a# // Add 7 days on top of current date time - Wed, 11 Jul 2014 12:08:56 PM

#date.DAY-1.EEE,d MMM yyyy h:mm:ss a# // Minus 1 days on top of current date time - Wed, 3 Jul 2014 12:08:56 PM

#date.dd-MM-yyyy[{form.j_expense_claim.title}|yyyy-MM-dd]# // Retrieves date from j_expense_claim table, form field title, changes its origin format of yyyy-MM-dd to dd-MM-yyyy.

...