Forum Discussion

JFM_12's avatar
JFM_12
Iron Contributor
Sep 03, 2021

Read SharePoint List and Converst String to Date

Hello

I would like to do following task:

1. Read a SharePoint List with a date-column (formatted as string)

2. Convert the data within this column into date (dd.MM.yyyy)

3. Compare it with the actual date

 

Do you have an example or a hint how to do that.

Every line of the sharepoint list should be read and the column compared with the actual date.

 

Thank you 

 

JFM_12

9 Replies

  • suvi-15's avatar
    suvi-15
    Brass Contributor

    Hi JFM_12 ,

     

    Using Flow you can fulfill your requirement 

    Here i used trigger option as When item created but if you don't want to use this option then there is Recurrence (Timer) option which you can set to trigger min/sec/hr option to trigger comparison.

    for Formatting date (Compose step)

    formatDateTime(triggerOutputs()?['body/TestDate'],'dd-mmm-yyyy')
    I hope this helps for you.
    • JFM_12's avatar
      JFM_12
      Iron Contributor
      Hello Suvi-15
      Thank you very much.
      I am getting an Excel-List that is read from flow
      But the column is stored as string.
      Need to convert it to date and compare it with a date.
      Is this possible?
      Regards
      JFM_12
    • RobElliott's avatar
      RobElliott
      Silver Contributor

      suvi-15  your formatDateTime is incorrect as in Power Automate months are formatted with capital Ms. Lowercase ms are for minutes.

       

      Rob
      Los Gallardos
      Microsoft Power Automate Community Super User

      • JFM_12's avatar
        JFM_12
        Iron Contributor

        Hi RobElliot
        Thank you.
        I know changed it to MM but still does not work.
        Thank you
        Regards
        JFM_12

Resources