Hi,
In a flow, i added the actio parse json.
the I use the dynamic filter provided by json to add a date in my sharepoint list.
The output is in this format
I want to keep the date only.
For that i add a compose action and i use this expression
substring(outputs('Compose'),0,10)
It's working for the monteh where the date are in this format DD/MM/YYYY but sometimes the date are in this format DD/M/YYYY and in this case the expression take the comma. Exemple : 14/01/2022,
Could you help me ?
Thanks
Solved! Go to Solution.
We can use the split() function, and split the date/time at the comma character. Try the following expression:
first(split(outputs('Compose'),','))
The split() function returns an array with two items:
We just want the first item. The first() function will return the first item of the array (i.e. item 0).
The following shows the run time output - with date/times of different lengths:
Hope this helps.
Ellis
____________________________________
If I have answered your question, please mark the post as Solved.
If you like my response, please give it a Thumbs Up.
Wow. Just brillant. Thank You so wuch. It s working
And your explanations are very clear
We can use the split() function, and split the date/time at the comma character. Try the following expression:
first(split(outputs('Compose'),','))
The split() function returns an array with two items:
We just want the first item. The first() function will return the first item of the array (i.e. item 0).
The following shows the run time output - with date/times of different lengths:
Hope this helps.
Ellis
____________________________________
If I have answered your question, please mark the post as Solved.
If you like my response, please give it a Thumbs Up.
Wow. Just brillant. Thank You so wuch. It s working
And your explanations are very clear
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Announcing a new way to share your feedback with the Power Automate Team.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
User | Count |
---|---|
67 | |
24 | |
16 | |
16 | |
13 |
User | Count |
---|---|
116 | |
35 | |
32 | |
28 | |
26 |