cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
CHF
Helper I
Helper I

Select Day or Month only from string

Hi

 

I am trying to select either the day or the month from the current date. I am not sure what i am doing wrong here? So far  i have:

 

1. Action to get the current time.

2. convert output of action 1 by using the "Convert time zone", Long date pattern( Monday, June 15, 2009)

3. use compose to select the day or the month from action 2, but its not working. I am not sure of the syntax to use?  

Capture.PNG

 

code i am using for the compose:

 

first(split(outputs('Current_time'),', "'))

 

Any help would be appreciated. 

 

Regards

 

Tyron

1 ACCEPTED SOLUTION

Accepted Solutions
v-yuazh-msft
Community Support
Community Support

Hi @ CHF,

 

Could you please share an example to explain more about your requirement?

Do you want to get the Day or Month only from string?

 

I have made a test on my side,and have created a flow as below:

Capture.PNG

 

The flow woud run successfully as below:

Capture.PNG

 

Could you please share an example about what you want to get from the string "Saturday, April 28, 2018"?

Do you want to get the "28" as day of the string "Saturday, April 28, 2018" and "April" as month of the string "Saturday, April 28, 2018"?

 

If want to get the "28" as day of the string "Saturday, April 28, 2018" and "April" as month of the string "Saturday, April 28, 2018",please refer to screenshot below to create the flow:

Capture.PNG

 

 

The expression in the Compose 2 as below:

 

first(skip(split(outputs('Compose'),','),1))

 

The expression in the Compose 3 as below:

 

first(skip(split(outputs('Compose_2'),' '),1))

 

The expression in the Compose 4 as below:

first(skip(split(outputs('Compose_2'),' '),2))

The flow would run successfully as below:

Capture.PNG

 

Please let me know if your problem could be solved.

 

 

Regards,
Alice Zhang

View solution in original post

2 REPLIES 2
v-yuazh-msft
Community Support
Community Support

Hi @ CHF,

 

Could you please share an example to explain more about your requirement?

Do you want to get the Day or Month only from string?

 

I have made a test on my side,and have created a flow as below:

Capture.PNG

 

The flow woud run successfully as below:

Capture.PNG

 

Could you please share an example about what you want to get from the string "Saturday, April 28, 2018"?

Do you want to get the "28" as day of the string "Saturday, April 28, 2018" and "April" as month of the string "Saturday, April 28, 2018"?

 

If want to get the "28" as day of the string "Saturday, April 28, 2018" and "April" as month of the string "Saturday, April 28, 2018",please refer to screenshot below to create the flow:

Capture.PNG

 

 

The expression in the Compose 2 as below:

 

first(skip(split(outputs('Compose'),','),1))

 

The expression in the Compose 3 as below:

 

first(skip(split(outputs('Compose_2'),' '),1))

 

The expression in the Compose 4 as below:

first(skip(split(outputs('Compose_2'),' '),2))

The flow would run successfully as below:

Capture.PNG

 

Please let me know if your problem could be solved.

 

 

Regards,
Alice Zhang

View solution in original post

Hi

 

Thanks for the response, your first compose was what I was missing. I kept getting an object reference error in my testing. After adding that step, it started to work.  

 

 

As you asked you wanted an example, here it is:

 

I needed an out of the day and the month:

 

Day: Monday

Month: May

 

I changed your compose 4 to select the day(word) rather than the number. 

first(skip(split(outputs('Compose'),','),0))

Which gives me the day in words.

 

Thanks for your help! 

 

Regards

 

Tyrone

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Users online (29,895)