Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

Cannot use a DateTime control with non-standard format



User is trying to create a new Control rule which will display DateTime in a custom Date Time format but encounters error.

Error Messages

Cannot create format "DateTime-DayMonthYear-Custom", default format is used
java.lang.IllegalArgumentException: Illegal pattern character 't'
at java.text.SimpleDateFormat.compile(
at java.text.SimpleDateFormat.initialize(
at java.text.SimpleDateFormat.<init>(
at sun.reflect.GeneratedMethodAccessor95.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(
at java.lang.reflect.Method.invoke(
at com.pega.pegarules.exec.internal.util.PRDateTimeUtilsImpl.formatDateTime(
at com.pegarules.generated.pxFormatDateTime_071017_nbON9iBZMLvY_eVJ9sjXBA.pxFormatDateTime07_10_17(
at com.pegarules.generated.pxFormatDateTime_071017_nbON9iBZMLvY_eVJ9sjXBA.invoke(
at com.pega.pegarules.generation.internal.library.LibraryRuntime.resolveAndinvokeFunctionViaReflection(
at com.pega.pegarules.generation.internal.library.LibraryRuntime.invokeLibraryRuntime(
at com.pega.pegarules.session.internal.mgmt.Executable.invokeLibraryRuntime(
at com.pega.pegarules.priv.generator.LibrarySupport.resolveAndInvokeFunctionViaReflectionWithException(

Steps to Reproduce

1. Try to select one of the Out-of-the-box (OOTB) formats on pxdatetime control.
2. Run preview.

Root Cause

A defect in Pegasystems’ code or rules: UI control not passing the right format to Engine formatter.


Apply HFix 41434.

Published April 30, 2018 - Updated October 8, 2020

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration 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 Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us