Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

Java date pattern

Updated on November 15, 2021
Applicable to Theme UI-Kit applications

A Java date pattern is a sequence of one or more letters that controls the presentation of a date, or date and time. For example, the pattern MM/dd/yyyy is a request for a date to be presented in the format 07/04/1976 for July 4, 1976.

The standard function rule FormatDateTime() in the PegaRULES DateTime library can convert a DateTime property value according to a Java date pattern.

These letters are most often used in a date pattern. Case is significant.

  • y - Year as a number
  • M - Month, for example July, 07, or 7
  • w - week in year, as a number
  • D - Day in year, as a number
  • d - day in month
  • H - hour in day (0-23)

Time zones and locales can also be parameters to the FormatDateTime() function, so that the pattern "yyyy.MM.dd G 'at' HH:mm:ss" with time zone 08 (Pacific) and locale EN can produce the value 2006.07.04 at 12:08:56 PDT.

For a comprehensive description of pattern syntax, consult a Java language reference for the SimpleDateFormat class.

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us