Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Answered

String was not recognized as a valid DateTime

(0) ShareShare
ReportReport
Posted on by 2

Hi ,

I am creating the item based on excel data but the I am getting error with date, only date field is show the error to create item.

Error:String was not recognized as a valid DateTime

Connector: Excel Online Business
Please any one suggest with example.
  • v-alzhan-msft Profile Picture
    on at
    Re: String was not recognized as a valid DateTime

    Hi @VinaySiddarth ,

     

    Does your issue still exists?

     

     

    Best regards,

    Alice       

     

    Community Support Team _ Alice Zhang
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • v-alzhan-msft Profile Picture
    on at
    Re: String was not recognized as a valid DateTime

    Hi @VinaySiddarth ,

     

    Please share the expression For the Start Date column in your flow.

    And please share the run history of flow when it flow has run failed.

     

    Best Regards,

    Alice

     

    Community Support Team _ Alice Zhang
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • VinaySiddarth Profile Picture
    2 on at
    Re: String was not recognized as a valid DateTime

    Hi Alice,

    Please do find the  screen shot.

    Screenshot1Screenshot1Screenshot12Screenshot12

     
     
  • Verified answer
    v-alzhan-msft Profile Picture
    on at
    Re: String was not recognized as a valid DateTime

    Hi @VinaySiddarth ,

     

    Could you please share a screenshot of the configuration of your flow?

    Hope the link below could helps:

    https://powerusers.microsoft.com/t5/Building-Flows/Unable-to-Process-Template-Language-for-Date-String-Integer/m-p/459934#M55065

     

    Best regards,
    Alice       
     
    Community Support Team _ Alice Zhang
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

  • efialttes Profile Picture
    14,756 on at
    Re: String was not recognized as a valid DateTime

    Hi

    Are you trying to store data in a Date format excel column? If so, you need to convert it into an integer.

     

    Let's assume you want to write in Excel a date that is stored in a variable called 'myNewDate' in the standard string format PA flow uses internally. So, I would try the following:

    add(div(sub(ticks(variables('myNewDate'),ticks('1900-01-01')),864000000000),2)

     

    The reason is, that according to this post, the date calendar in Excel is an integer representing the number of days since January 1st, 1900. Please also note, that, according to this web site:

     

    Days Since 1900-01-01 (+2) is used in the Microsoft Excel date functions such as DAY(serial_number) and WEEKDAY().

    Note, Excel's serial number is 2 higher than the number on this page.

    • In Excel January 1 is serial number 1. In this converter midnight January 1, 1900 is 0, after 1 day it is midnight on January 2. To correct this you have to add/subtract 1.
    • Excel incorrectly sees 1900 as a leap year (for compatibility with Lotus 1-2-3) so you have to add/subtract 1 to all days when using in Excel. Also see: Excel incorrectly assumes that the year 1900 is a leap year

     Hope this helps

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,645 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,997 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow