cancel
Showing results for 
Search instead for 
Did you mean: 

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

Former Member

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

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member214415
Active Participant
0 Kudos

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