728x90
반응형
/**
* Get Convert HHH:mm:ss to Second
*
* @param HHHmmss
* @return int
*/
public static int getConvToSeconds(String HHHmmss) {
String[] parts = HHHmmss.split(":");
int hours = Integer.parseInt(parts[0]);
int minutes = Integer.parseInt(parts[1]);
int seconds = Integer.parseInt(parts[2]);
return hours * 3600 + minutes * 60 + seconds;
}
728x90
728x90
'▶ Back-End > Java' 카테고리의 다른 글
GPU 작업 관리 예제 - GMS-WAS (0) | 2025.01.21 |
---|---|
Get Add Time(HHH:mm:ss) (0) | 2024.11.27 |
Get Convert Second to HHH:mm:ss (0) | 2024.11.27 |
Get Days Between Count (0) | 2024.11.27 |
Get Date Now in String (0) | 2024.11.27 |
댓글