Issue with @pxFormatDateOnly function yields incorrect Year

Hi All,

The function returns incorrect year when executed. When the Date string is “20241231” which is yyymmdd format and if I use the function @pxFormatDateOnly with @pxFormatDateOnly(“20241231”,“yyyyMMdd”,“dd-MMM-YYYY”) it returns incorrect date as 31-Dec-2025. See the attachment.

Can somebody help me on this?

Thanks in advance.

Regards,

Sakhib Hussain

@SakhibHussain

Yes there’s an issue with the Pega platform code where this happens. We raised a ticket on this and the reply was that the year format we have to use lower case y instead of upper case Y. In your case, try with using “dd-MMM-yyyy”.

@SohamM95 Thanks. This solved