on 07-25-2019 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
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
Welcome Dhairya.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
10 | |
8 | |
6 | |
6 | |
5 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.