on 2022 Feb 03 9:43 AM
Hello Team,
I have a requirement where I need to send the date in 10 digit number like "1643611297" through SAP CPI.
Can anyone please suggest me if there is any groovy script to convert date from format like "YYYY-MM-DD HH:mm:ss.SSS" to "1643611297"?
Thanks
Help others by sharing your knowledge.
AnswerRequest clarification before answering.
//Use class
import java.util.Date;
Date oldDate = Date.parse('yyyy-MM-ddHH:mm:ss.SSS', yourDateVariable);
String newDateAsString = oldDate.format("yyyyMMddHH");
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
77 | |
30 | |
10 | |
8 | |
8 | |
7 | |
7 | |
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.