Discussion

1
Replies
1757
Views
Srihari Sirumalla (SrihariS)
Coforge Technologies
Senior Technology Specialist
Coforge Technologies
GB
SrihariS Member since 2015 2 posts
Coforge Technologies
Posted: August 22, 2017
Last activity: January 23, 2018
Posted: 22 Aug 2017 4:50 EDT
Last activity: 23 Jan 2018 5:29 EST

Convert Excel Date value to Pega DateTime format

Create a function with String as input and DateTime as return type. Place the below code in the function.

if(strDate == null || strDate.equals("")){
return null;
}else{
Date javaDate= DateUtil.getJavaDate(Double.parseDouble(strDate));
SimpleDateFormat sd = new SimpleDateFormat("yyyyMMdd'T'HHmmss.SSS");
return sd.format(javaDate)+" GMT";
}

***Updated by moderator: Lochan to unmark post as question***

Low-Code App Development Developer Knowledge Share