Skip to Content
avatar image
Former Member

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

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Mar 15, 2017 at 12:49 PM

    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

    Add comment
    10|10000 characters needed characters exceeded