web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Convert text from Form...
Power Automate
Unanswered

Convert text from Forms to date before adding a row to Excel

(0) ShareShare
ReportReport
Posted on by 15

Hi all

I'm a newbie and have the follwing setup:

A progress tracking form and the user can select a month provided as options "01.01.2019" "01.02.2019". 

Now this stored as text. Then I have a flow that adds a row to an Excel sheet when a new form is entered.

I like to convert this text string to a date before sending to Excel....but how 🙂 I want avoid doing this when in Excel..

 

Hope someone can solve this I presume easy task...

 

Thanks 

Daniel

 

 

Categories:
I have the same question (0)
  • v-zhos-msft Profile Picture
    on at

    Hi Daniel1973,

    According to your description, what your purpose is to convert the text string to a date before insert into Excel.

    I have made a flow for your scenario, please check it for a reference.

    As you say the options are like: "01.01.2019" "01.02.2019"

    First, I use the Compose action to split the String, the expression is : split(body('Get_response_details')?['Month'],'.')

    Second, I use the Compose action to convert the string to Date format., the expression is : concat(outputs('Compose')[2],'/',outputs('Compose')[1],'/',outputs('Compose')[0])

    2.png3.png

    Please feel free post back if you need more help.

    Best regards,

    Zhonys

  • Daniel1973 Profile Picture
    15 on at

    Hello Zhonys

    Thank your for your help. I'm understanding the process, at least.

    Now I get an error message in the first compose, where the supposed string is splitted. Looks the input from forms is not recognized as string. What else and how to overcome this. Any idea?

     

    InvalidTemplate. Unable to process template language expressions in action 'Compose' inputs at line '1' and column '1717': 'The template language function 'split' expects its first parameter to be of type string. The provided value is of type 'Null'. Please see https://aka.ms/logicexpressions#split for usage details.

  • v-zhos-msft Profile Picture
    on at

    Hi Daniel,

    Please pay attation on the Response ID, I was use 2 as a test above. You can take a reference to below:

    3.PNG

    Regards,

    Zhongys

  • Daniel1973 Profile Picture
    15 on at

    Hi Zhongys

    I don't know exactly what you mean. Here is the function and a screenshot:

     

    plit(body('get_response_details')?['Month'],'.')

     

    01-02-_2019_09-45-43.png

     

    Daniel

  • v-zhos-msft Profile Picture
    on at

    Hi Daniel,

    As you say the options are like: "01.01.2019" "01.02.2019"

    The 'Month' in split(body('Get_response_details')?['Month'],'.') is just the name of the Date I setted in the Form.

    The action is to split the Date you have selected, like split "01.02.2019" to [01,02,2019]

    Best Regards,

    Zhongys

  • Daniel1973 Profile Picture
    15 on at

    HI Zhongys

    Now it worked! Thanks.

    The issue was that I had first to learn how to construct the function. That I simply can select the item.

     

    Great support!

     

    Daniel

  • Verified answer
    v-zhos-msft Profile Picture
    on at

    Hi Daniel,

    I was glad to hear that,If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

    Best Regards,

    Zhongys

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 503 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 321 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard