Question

How to set DateTime property from Month, Day, Year Text properties

How can I set a Pega DateTime property in a Data Transform from individual Month, Day, Year Pega Text properties?

***Edited by Moderator Marissa to update platform capability tags****

Correct Answer
June 21, 2019 - 9:49am

We could switch the Pega property to a Date, so, I no longer need help with this.

Comments

Keep up to date on this post and subscribe to comments

Pega
June 5, 2019 - 7:16pm

I think that you need to first concatenate Month, Day and Year to a correct Pega datetime string format. eg. "YYYYMMDDTHHMMSS Z" - where Z stands for timezone.

Then calling  @toDateTime function in the String library that returns a PRPC DateTime.

eg. @String.ToDateTime("20190122T113000")

 

June 6, 2019 - 11:04am
Response to SusanLiu

I tried this @toDateTime(.Year+.Month+.Day+"T000000E") but did not work.  I didn't see any errors or exceptions.  When I did a Test in the Expression Builder, I got a result of 0.  And when I ran the app, the DateTime field was not set in the clipboard.

June 21, 2019 - 9:49am

We could switch the Pega property to a Date, so, I no longer need help with this.

Mod
June 21, 2019 - 10:02am
Response to KathyD79

Thank you for the update! We will mark this post as Answered. By the way, was there steps you followed to switched the Pega property to a Date?

Thanks,

Lochana | Community Moderator | Pegasystems Inc.