Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
hosasahana
Partner - Contributor III
Partner - Contributor III

extract the number part from a string

hi,

I am trying to extract the timing part only from below string, can someone help me on this? I want to extract 30 from this and convert it into seconds.

 

hosasahana_0-1606906221465.png

thanks!

sahana

1 Solution

Accepted Solutions
Kushal_Chawda

@hosasahana  try below

LOAD *,
     keepchar(TextBetween(Field,'(',')'),'0123456789')*60*60 as Seconds
FROM table

View solution in original post

5 Replies
hosasahana
Partner - Contributor III
Partner - Contributor III
Author

Can someone help me pl?

Kushal_Chawda

@hosasahana  Will the number be always in hours? What kind of values could be?

hosasahana
Partner - Contributor III
Partner - Contributor III
Author

hi Kush,

thanks for responding. yes the number is always in hours and we have 4 diff values as shown below. I need to extract the 4,8,20 and 30.

hosasahana_0-1606921928821.png

 

Kushal_Chawda

@hosasahana  try below

LOAD *,
     keepchar(TextBetween(Field,'(',')'),'0123456789')*60*60 as Seconds
FROM table
hosasahana
Partner - Contributor III
Partner - Contributor III
Author

thankyou Kush 🙂