How to substring a textfield

For HanDBase related topics that are not specific to one platform.

How to substring a textfield

Postby kluesi » Wed Jun 20, 2018 7:26 am

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
kluesi
 
Posts: 3
Joined: Tue Jun 19, 2018 9:23 am

Re: How to substring a textfield

Postby mjhanna » Wed Jun 20, 2018 10:32 am

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?
Michael
(Only a user and not affiliated with DDH Software, but working with computer databases for over fifty years.)
mjhanna
 
Posts: 159
Joined: Tue Oct 15, 2013 10:56 am
Location: New Mexico


Return to HanDBase General Discussion

Who is online

Users browsing this forum: No registered users and 2 guests

cron