Skip to main content

Notifications

Power Automate - Building Flows
Answered

gSheet Date Picker - Flow - SharePoint new Item

Posted on by

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

 

  • v-duann-msft Profile Picture
    v-duann-msft on at
    Re: gSheet Date Picker - Flow - SharePoint new Item

    Hi @LukePWilkins 

     

    Thanks for confirmation. Glad to hear it works for you. 😀

     

    Have a good day !

     

    Best wishes,

    Anna

  • Re: gSheet Date Picker - Flow - SharePoint new Item

    You are a genius Anna! Thank you. That has worked...

     

    I have learnt something new today

     

    Thank you!!!

  • Re: gSheet Date Picker - Flow - SharePoint new Item

    Thanks for this Anna, I will give it a go!

  • Verified answer
    v-duann-msft Profile Picture
    v-duann-msft on at
    Re: gSheet Date Picker - Flow - SharePoint new Item

    Hi @LukePWilkins 

     

    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:

    v-duann-msft_0-1616484206356.png

     

    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:

    v-duann-msft_1-1616484206361.png

     

    Hope the content above may help you.

     

    Thanks

    Anna

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #7 Community Profile Tips…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,297

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,890

Leaderboard