String Manipulation

Hello,
How to convert
1:01.67 (mm:ss.ms) to 61.67 (ss.ms)
Thanks for your help

Br

Hi,
You can use a Cell Splitter to split on the colon (:), then you have two columns with 1 and 01.67. Turn both into double values, multiply the first column with 60 using a Math Formula node and then sum up the two values.
Kind regards,
Alexander

5 Likes

Hello @Brain,
You can use the Java Snippet node and write code like the following:
int seconds = c_col1.getSecond();
int min=c_col1.getMinute();
int cal =(min*60)+seconds;
String result=Integer.toString(cal)+“:”+c_col1.getNano();
out_update = result;

Refer to the attached image for guidance on configuring the Java Snippet node.

Output :

Screenshot 2024-01-16 111350

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.