Question
Optum
IN
Last activity: 11 May 2018 13:29 EDT
Exceptions when i use currentdate function
Hi,
Can some one guide me why i am getting the exceptions when i use @DateTime.CurrentDate("yyyyMMDDThhmmss","CST") function. How to resolve this, could you please share your thoughts on this.
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Pegasystems Inc.
US
Can you use of "yyyyMMdd" format?
Pegasystems Inc.
US
Please check below pdn link:
https://community.pega.com/support/support-articles/currentdate-function-ignoring-time-zone
Optum
IN
I have tried with the suggested pdn approaches but no luck, could you please give me some approach.
Pegasystems Inc.
IN
Optum
IN
Hi Durga,
I have used @CurrentDate(@CurrentDateTime(), "CST") this function, it is throwing the below exception. Could you please let me know what can i do on this.
2018-05-08 08:44:06,686 [ WebContainer : 8] [TABTHREAD1] [ ] [ MIIM:02.08.01] ( pub.util.PRDateFormat) ERROR miim.uhc.com| Proprietary information hidden kcastro2 - Cannot create format "20180508T134406.686 GMT", default format is used
java.lang.IllegalArgumentException: Illegal pattern character 'T'
Pegasystems Inc.
IN
You can use of below java steps to get the current timestamp
DateTimeUtils dtu = ThreadContainer.get().getDateTimeUtils();
return dtu.getCurrentTimeStamp();
Thanks,
Arun
Optum
IN
Is there any other way with out using the java step.As Pega doesn't recommend java much.
-
Devi Pattanaik Vikram Murarishetty