Java Time Format getTimeSystem(String formatTime)

Here you can find the source of getTimeSystem(String formatTime)

Description

get Time System

License

Open Source License

Declaration

public static String getTimeSystem(String formatTime) throws Exception 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static String getTimeSystem(String formatTime) throws Exception {
        String timeSystem = null;
        try {/*from  www  . j av  a2s .  c o m*/
            if (formatTime == null) {
                formatTime = "HH:mm:ss";
            }
            java.text.SimpleDateFormat format = new java.text.SimpleDateFormat(formatTime);
            java.util.Date date = new java.util.Date();
            timeSystem = format.format(date);
        } catch (Exception e) {
            throw new Exception("Formato ora non valido");
        }
        return timeSystem;
    }
}

Related

  1. getTimeInProvenanceFormat(Date date)
  2. getTimeOnlyDateFormat()
  3. getTimeOnlyWithNumber()
  4. getTimeQuantum(String strDate, String format)
  5. getTimeStringFormatedForSWANWithDelim( final Object pObjTime, final String pStrDelim)
  6. getTwoTimeInterval(String startTime, String endTime, String format)
  7. getUniversalDateTimeFormat()
  8. getXsdDateTimeFormat()
  9. getXSDFormatter(DateTime date)