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

Getting exception for date format for "YYYYMMDDTHHMMSS.QQQ"



Illegal pattern character "Y" reported for date format string:

Error Messages

Top Level Exception Class: java.lang.IllegalArgumentException

Root Exception Message: Illegal pattern character 'Y'

Steps to Reproduce


Root Cause

The root cause of this problem is software use/operation error. The date format string is not valid and so a default format is used and an error is reported.


The explanation for this behavior is as follows:
The date format string is not valid and so a default format is used and an error is reported. 

The date format string is case sensitive and using "Y" for "y" for the year digits is not accepted.  Other characters are also incorrectly cased.

The Javadocs on SimpleDateFormat contain a description of date format string that is applicable for the CurrentDate call.

Published March 12, 2016 - 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