Java Second Get getSecondFromHMS(String hms)

Here you can find the source of getSecondFromHMS(String hms)

Description

get Second From HMS

License

Open Source License

Declaration

public static String getSecondFromHMS(String hms) 

Method Source Code

//package com.java2s;

public class Main {
    public static final String DEFAULT_TIME_FORMAT = "HH:mm:ss";

    public static String getSecondFromHMS(String hms) {

        if (hms == null || hms.length() != DEFAULT_TIME_FORMAT.length()) {
            return null;
        }/*ww  w.  j a v  a  2  s .  c om*/

        return hms.substring(6, 8);
    }
}

Related

  1. getSecondByHour(int hour)
  2. getSecondByteFromInt(int num)
  3. getSecondColumnAsArray(String[][] stringMatrix)
  4. getSecondExampleTime()
  5. getSecondField(String rowStr, char delimiter)
  6. getSecondFromTime(int hour, int minute, int second)
  7. getSecondInt(long c)
  8. getSecondInt(long time)
  9. getSecondMaxInArray(float[] arr)