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 / Can't convert string t...
Power Automate
Answered

Can't convert string to date

(1) ShareShare
ReportReport
Posted on by 364

Hi all,

 

I'm having real trouble here. I have a SP column called FDate that is a string. It needs to be a string for it's use in PowerApps. I'm trying to build a GetItems Filter Query that compares whether or not it is in the future. A really minor thing, but I can't get it to work. For example, my date might be 23/11/2023. Comparing to utcNow throws up the error it is in the wrong format. 

 

I've tried to following commands for converting it:

parseDateTime('FDate','en-US','yyyy/MM/dd')

formatDateTime('FDate, 'yyyy/MM/dd')
concat(split('FDate','/')[2],'-',split('FDate','/')[0],'-',split('FDate','/')[1])  --- (this gives me an error about the [2] being outside array?)
 
Nothing works. I've also tried to above on the utcNow portion to see if I can convert that to be the same. Nothing.
 
Any ideas?
 

 

Categories:
I have the same question (0)
  • Verified answer
    abm abm Profile Picture
    32,865 Most Valuable Professional on at

    Hi @EpicTriffid 

     

    You need to use split and concat() expression together. See this article below

     

    How to Convert a String to Date in Power Automate - Power Tech Tips

     

    Thanks

  • EpicTriffid Profile Picture
    364 on at

    Hi @abm 

     

    Thank you for the reply!

     

    I have already tried that with this, I believe: 

     

    concat(split('FDate','/')[2],'-',split('FDate','/')[0],'-',split('FDate','/')[1])

     

    However, I notice your link has this occurring in several steps using Compose actions. If it needs to be done that way, how would I get the value from SharePoint to run it through the Compose actions to then feed it back into the Filter Query?

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 519 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 296 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard