Question
Capgemini
IN
Last activity: 4 Oct 2018 13:54 EDT
How to display Current submission date and Current submission time in YYYYMMDD and HHMMSS formats
Hi,
in an activity, i have two parametrs 1.Current submission date(YYYYMMDD)
2.CurrentSubmissiontime(HHMMSS)
How to display the property values in the above format.
***Updated by Moderator: Marissa to update categories***
**Moderation Team has archived post**
This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Pegasystems Inc.
IN
Updated: 14 Mar 2016 7:15 EDT
Capgemini
IN
and Can you please tell me the solution for the Time format...format should be like HHMMSS???
Thanks,
Praveen
Citicorp Services India Private Limited
IN
Hi Praveen,
I believe you like to display the Date and Time format in the UI.
1. Add date time control in your section and configure as shown below.
similarly for time change the custom format to hh:mm:ss.
The following is the result I got.
Please let me know if my understanding is wrong.
Thanks,
Gowrishankar.
Capgemini
IN
Bank Of America
IN
Hi Praveen,
you can use this @DateTime.getCurrentTimeOfDayOnlyStamp() , it will show the time HHMMSS
Thanks,
Ashfiled
US
Get the current date and pass to the below function. it will return the required format.
@(Pega-RULES:DateTime).FormatDateTime(Param.{paramname}, "MMM dd',' yyyy HH:mm:ss a", null, "ESTor GMT")
Pegasystems Inc.
IN
You can use the same FormatDateTime utility function with patterns defined in "SimpleDateFormat" https://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html
param.RCVTM=@FormatDateTime(@CurrentDateTime(),"hhmmss","",null)
this should be fine.
Lloyds Banking Group PLC
GB
Hello Praveen,
You can try as mentioned below:
@FormatDateTime(@CurrentDateTime(), "yyyyMMdd", "GMT", "") -- returns date as 20180228
@getCurrentTimeOfDayOnlyStamp() -- returns time stamp as 205013