I have a collumn which has values like 2h 50 m ,3h 10 m etc.
Is there a way to convert this to a value like 2.50,3.10 etc
Any leads would help.
TIA
Hi
Try this
| makeresults
| eval test="2h 50 m ,3h 10 m"
| makemv delim="," test
| mvexpand test
| eval test=replace(replace(test,"h\s","."),"\s{0,}m\s{0,}","")
| mvcombine delim="," test
| nomv test
You can use regex like below-
|rex mode=sed field=yourcolumnname "s/(\d+)h\s*(\d+).*/\1.\2/g"