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

Community site session details

Session Id : cB49zrVHxEojGNV3QirbkO
Power Apps - Building Power Apps
Answered

date function

Like (0) ShareShare
ReportReport
Posted on 14 Feb 2024 19:16:36 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.
 
 

 

 

I have the same question (0)
  • neuronic Profile Picture
    177 on 14 Feb 2024 at 19:31:40
    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,280 Super User 2025 Season 2 on 14 Feb 2024 at 19:23:20
    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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Telen Wang – Community Spotlight

We are honored to recognize Telen Wang as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 637 Most Valuable Professional

#2
stampcoin Profile Picture

stampcoin 570 Super User 2025 Season 2

#3
Power Apps 1919 Profile Picture

Power Apps 1919 473

Loading complete