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?
code i am using for the compose:
first(split(outputs('Current_time'),', "'))
Any help would be appreciated.
Regards
Tyron
Solved! Go to Solution.
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:
The flow woud run successfully as below:
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:
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:
Please let me know if your problem could be solved.
Regards,
Alice Zhang
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:
The flow woud run successfully as below:
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:
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:
Please let me know if your problem could be solved.
Regards,
Alice Zhang
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