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