on 2019 Jul 25 7:47 AM
Hello guys,
There is a requirement where i have to compare a particular date in payload with Current date plus 5 days in CPI PI mapping.
It seems to be very difficult to get current date + 5 via graphical mapping.
So am trying to write a custom function(Groovy Script) inside mapping to get Current Date + 5. I am new to CPI and groovy script so can any one guide me here to achieve this result ?
Thanks & Regards,
Dhairya
Request clarification before answering.
Date curdatejp = new Date() + 5
curdatejp.format("yyyyMMdd") // yyyyMMdd formats the date in the way you want like 20190730, you can set your own format based on requirement.
With Regards,
Subhojit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Subhojit.
I am able to get the desired result now.Cheers
| User | Count |
|---|---|
| 18 | |
| 7 | |
| 6 | |
| 6 | |
| 6 | |
| 4 | |
| 3 | |
| 3 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.