Page 1 of 1

How to substring a textfield

PostPosted: Wed Jun 20, 2018 7:26 am
by kluesi
Hi

I want to insert a duration field where I can write duration values like "00:15" (15 minutes) but also "36:00" (36 hours). So I cant take the time field because it shows only 23 hours. So I think I put a text field in the dataset and extract the part before and the part after the ":" and put it into two separate integer fields. But I found nothing like a substring function. How can I split this text?

Thanks Kluesi

Re: How to substring a textfield

PostPosted: Wed Jun 20, 2018 10:32 am
by mjhanna
Not sure what you mean by "insert" a duration field. If you mean you are manually "entering" the hours and minutes as values, I would suggest creating the data input record Form as already being two integer fields, one for hours and one for minutes, with the colon as fixed text between. Then you can do whatever calculations you wish using these two integer fields to create other field values. Am I misunderstanding what you are trying to do?