Question
4
Replies
17344
Views
Virtusa
Posted: June 4, 2017
Last activity: June 16, 2017
[Datetime Formatting] Converting to Pega datetime format
Hi ,
I am trying to convert below datetime to Pega datetime format . Is there any OOTB functions which does ?
Input : 2002-04-08T21:00:00+06:00
Note : i did try @(Pega-RULES:DateTime).FormatDateTime(...) , but dint work .
Version : 7.17
Appreciate your response.
Thanks
***Updated by moderator: Lochan to update Categories***
Hi Aditya,
Would suggest you to create a control as below and use this for the input datetime field;
--- JSP Code-----
<%
String st = tools.getActiveValue();
DateTimeUtils dtu = ThreadContainer.get().getDateTimeUtils();
String sdt = dtu.formatDateTime(st, "dd-MMM-yyyy hh:mm:ss a z","Europe/London","en_GB");
tools.appendString(sdt);
%>
--- JSP code ends here ----
Let me know if this helps.
Regards,
Basavaraj