I need to extract number 30 from below data.
Note that the data is dynamic. the data keeps on changing.
00:00:30.4451618
I need to extract number 30 from below data.
Note that the data is dynamic. the data keeps on changing.
00:00:30.4451618
Also how to extract only 00:00:30 number and exclude numbers after dot
Hello @basavarajbennur07
You can use Regex to get the number.
Assign str_result = System.Text.RegularExpressions.Regex.Match(str_input,":(?'Number'\d+)\.").Groups("Number").ToString
Download file here:
Regex.xaml (8.5 KB)
Regards
Soren
Also how to extract only 00:00:30 number and exclude numbers after dot
![]()
Peter’s posts are definently the “most correct” way of achieving what you are looking for.
str_data=“00:00:30.4451618”
please use below syntax to get required output:
str_data.Split(".“c)(0).Split(”:"c).Last()