Skip to main content
Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

date function

(0) ShareShare
ReportReport
Posted on by 177

I have a text input control, myDateControl, in a Power App linked to Share Point lists. myDateControl is used for patching an SP list.

To extract the date from myDateControl, I have:

 

Date( 
First(Split(newArtistDob.Text,"/")).Value,
Last(FirstN(Split(newArtistDob.Text,"/"),2)).Value,
Last(Split(newArtistDob.Text,"/")).Value
)
 
This always produces incorrect date, e.g. 02/01/2001 yields 24/06/1907
 
What am I doing wrong?
Thank  you.
 
 

 

 

  • neuronic Profile Picture
    177 on at
    Re: date function

    Thank you, I suspected I was doing something stupid but couldn't see it.  Yes, in fact, I should just use datepicker. Greatly appreciated, Thank you!

  • Verified answer
    BCBuizer Profile Picture
    22,262 Super User 2025 Season 1 on at
    Re: date function

    Hi @neuronic ,

     

    The issue is that you have reversed the day and year arguments:

    BCBuizer_0-1707938547873.png

    By swapping them, you get the correct output:

    Date( 
    Last(Split(newArtistDob.Text,"/")).Value,
    Last(FirstN(Split(newArtistDob.Text,"/"),2)).Value,
    First(Split(newArtistDob.Text,"/")).Value
    )

     

    On a different note, why not use a datepicker control?

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 1