How to Customize the Default Date Format for the en_CA Locale in Pega Constellation?

Hi everyone,

In my Pega Constellation application, the date format is controlled by the operator’s locale. For example, setting the locale to en_CA displays dates in yyyy-MM-dd format.

My requirement is to display dates in MM/dd/yyyy format while keeping the locale as en_CA.

Is there any OOTB configuration to customize the default date format for a specific locale across the application, without updating individual views or date fields?

Any suggestions would be appreciated.

Thank you!

In Constellation, date formatting is primarily driven by the user’s locale and the browser’s internationalization settings. The platform is designed to display dates according to the locale conventions (for example, en_CA → yyyy-MM-dd, en_US → MM/dd/yyyy). Another potential option to consider to use DX Component.

Hi @RameshSangili Thank you for the detailed explanation and for suggesting the DX Component approach. This is very helpful and gives me a better understanding of how Constellation handles date formatting.

You can override the display of the date? perhaps that give you enough control to manage the expected outcome without resorting to DX Components?

You could put medium or long, that would avoid any confusion about date formats…

Hi @MarcCheong Thank you for your answer. Your suggestion is valid, but in my scenario, the application supports multiple regions, including the US, EMEA, and Canada. The US and EMEA date formats differ from the Canadian format, and the current configuration works based on the local settings, except for Canada. If I change the view to use a medium or long date format, it will also affect the date display for the other regions. Therefore, I’m looking for a solution that supports region-specific date formats without affecting the existing configurations.

Hello @Eranda_Weerasingha

The left over option is to write a custom DX component extending the OOTB one. I have already replied to a similar question in the below post sometime back.

Kindly have a look at it. Hope it helps

Regards

JC