blob: cb13f5de5a1fed84ac5baedbee0c068551f85407 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
package org.openecomp.sdc.vendorlicense;
import java.text.ParseException;
import java.text.SimpleDateFormat;
public class VendorLicenseUtil {
public static String getIsoFormatDate(String inputDate) {
String isoFormatDate = null;
SimpleDateFormat isoDateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'");
SimpleDateFormat inputDateFormat = new SimpleDateFormat("MM/dd/yyyy'T'HH:mm:ss'Z'");
try {
isoFormatDate = isoDateFormat.format(inputDateFormat.parse(inputDate));
} catch (ParseException e) {
isoFormatDate = null;
}
return isoFormatDate;
}
}
|