Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Got an error when creating routine
@Karuetl wrote:
Got an error when creating routine
you just need chose array element for parse
0 - hours
1 - minutes
2 - seconds
public static String CalculateTotalSeconds(String timein) {
String[] date_string = timein.split(":");
int hours = Integer.parseInt(date_string[0]);
int mins = Integer.parseInt(date_string[1]);
int seconds = Integer.parseInt(date_string[2]);
int totalsec = (hours * 3600)+ (mins* 60) + seconds;
return "" + totalsec;
}
P.S.
keep in mind - original routine return String, if you need have a long or integer - you need modify it or convert into integer in tMap/tJava
Thanks
thanks - it is too much ... kudu is enough 😉
welcome to community