Question
Tata Consultancy Services
Tata Consultancy Services
IN
Tata Consultancy Services
Posted: Jul 4, 2022
Last activity: Jul 7, 2022
Last activity: 7 Jul 2022 2:21 EDT
Closed
Solved
How to convert string to date in pega?
I am getting all the dates from data page in dropdown. But dates are displaying as text 20220808, I want to display this string as date, In format MM/dd/yyyy
***Edited by Moderator: Pooja Gadige to add capability tags***
To see attachments, please log in.
@AbhishekC1725 Hi Abhishek, you have mentioned about the data page but did not mention the source of DP. Assuming that it is a report definition. There is a option that you can use in the data page as a response data transform. Use the DT to loop over the results from the report. Use the function @DateTime.FormatDateTime(.pxCreateDateTime,"MM/dd/YYYY",null,null) to convert into required format (07/04/2022) in the loop.
If the source is a data transform/activity, you can do the same logic in this also. It will work.