Skip to Content
1

How do I extract part of a string into a variable?

Jan 25, 2017 at 05:33 PM

64

avatar image

Hello,

I am trying to extract part of a string into a variable. I have seen some other similar posts on using the Substr() function. I am struggling on how to best approach this with the strings that I have.

Currently, I am able to report on a data field named "Session Template". This field contains a day of the week, time range, and total hours.

Here are some samples:

F 2-3:15p (1.3hrs) Sa 9:30a-4:30p (7hrs) Sa/Su 9a-6p (2days) Tu 9-11:45a (2.8hrs)

I would like to be able to pull the End Time out of this field. So, in the four samples from above, I would like to use a variable formula that would give data such as:

3:15p

4:30p

6p

11:45a

Any suggestions on how I could tackle this?

Nick

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Swapna Jain Mar 15, 2017 at 12:49 PM
0

Hi Nick,

I have tried to find the solution at my level.

Here I am attaching one screen grab. Implement mentioned formula over there.

Formula:- =Substr("F 2-3:15p (1.3hrs)";(Pos("F 2-3:15p (1.3hrs)";"-")+1);6)

Thanks,

Swapna


Share
10 |10000 characters needed characters left characters exceeded