Question

3
Replies
51
Views
liebm1 Member since 2019 1 post
PEGA
Posted: 1 month ago
Last activity: 1 month ago

Convert datetime to a given time zone

Hi,

I am creating a When Rule for comparing an "ActivationDate" datetime property with the current date.

Since PEGA is loading the "ActivationDate" value from data base converting it to GMT, it is substracting 2 hours (from CEST to GMT time zone).

To do properly the comparation and check if the "Activation" anniversary is today, I should transform the ActivationDate property to CEST time zone.

I am trying using the OOTB @DatetTime.toLOCAL function, but it seems not to work.

In the examples below:

- when using "CEST" is restarting 2 hours to the GMT time, and it should be 2 hours more.

- when using "Europe/Madrid" is returning the same hour that the GMT time, and if should be 2 hours more.

Any advice about how to use the toLOCAL function or how could the convertion be done?

Thank you

Miguel

toLOCAL

toLOCAL

 

***Edited by Moderator Marissa to update Platform Capability tags****

 

Pega Customer Decision Hub 8.2 User Interface
Share this page LinkedIn