Time format

public static String convertToEventFormat(String date) {
    String finaldate = null;
    try {
           SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        Date date1 = fmt.parse(date);
        SimpleDateFormat fmtOut = new SimpleDateFormat("dd-MM-yyyy hh:mm aa");
        finaldate = fmtOut.format(date1);

    } catch (ParseException e) {
        e.printStackTrace();
    }

    return finaldate;

}

No comments:

Post a Comment

Run/install/debug Android applications over Wi-Fi ?

Open Teminal/cmd --------------- Below steps is for Android 10 or lower Step 1 - Connect the device via USB and make sure debugging is work...