Hello
I appreciate that there is a heap of posts about date string manipulation, but I haven't found anything that work; hope someone has come up against a similar issue as the one below.
I have a google form which has a date picker, which populates a gSheet. The format of the date is (New Zealand) dd/MM/yyyy
I can retrieve those rows into a Flow without any issue.
When it comes to utilising that date value as a field in a New Sharepoint item, the process fails.
I can see that the date format to populate a Sharepoint item needs to be yyyy-MM-dd
The value from the gSheet is a string, not a date.
How does one go about manipulating the date (as a string) and convert to an acceptable date format that a new Sharepoint item flow will accept.
Currently, I'm going into the gSheet each day, and changing the formatting of the cells I need processing.
regards
Thanks for confirmation. Glad to hear it works for you. 😀
Have a good day !
Best wishes,
Anna
You are a genius Anna! Thank you. That has worked...
I have learnt something new today
Thank you!!!
Thanks for this Anna, I will give it a go!
Thank you for posting.
According to your description, you would like to get correct date format acceptable for sharepoint list. If any misunderstanding, please kindly let me know.
Since you want to convert string to date and format it to ‘yyyy-MM-dd’. We can use compose action to achieve it. I assume your output date is 23/03/2021 as string.
Here is the flow steps for your reference:
Related expressions in order:
For day: first(split(outputs('output_from_Gsheet'),'/'))
For month: first(skip(split(outputs('output_from_Gsheet'),'/'),1))
For year: last(split(outputs('output_from_Gsheet'),'/'))
For the whole date: formatDateTime(concat(outputs('month'),'-',outputs('day'),'-',outputs('year')),'yyyy-MM-dd')
after that, I’m able to get correct date format as below:
Hope the content above may help you.
Thanks
Anna
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.