Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Posting on Qlik Community is temporarily paused. Thank you for patience and we'll update you soon!
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

Labels (1)
1 Solution

Accepted Solutions
Kushal_Chawda
MVP
MVP

@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
MVP
MVP

@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
MVP
MVP

@hosasahana  try below

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

thankyou Kush 🙂