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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Date conversion in Pow...
Power Apps
Answered

Date conversion in Power Apps

(0) ShareShare
ReportReport
Posted on by 9

I'm trying to convert a serial number to a date format. Using the the formula:

Text(DateValue(TextInput1.Text,"en-US"),DateTimeFormat.ShortDate)

where the value in TextInput1 is 44927 should return the date "1/1/2023" but it is returning "7/1/4492"

What am I doing wrong?

Categories:
I have the same question (0)
  • Jonathan Manrique Profile Picture
    2,695 on at

    Hi @jschult 

     

    You will not be able to convert that string into date format because it does not have the appropriate structure
    look at this example

     

    Jmanriquerios_0-1705511579820.pngJmanriquerios_1-1705511669135.png

    If I have answered your question, please mark your post as Solved.
    If you like my response, please give it a Thumbs Up.
    You can accept more than one post as a solution

  • mmbr1606 Profile Picture
    14,629 Super User 2026 Season 1 on at

    try this:

     

    Text(DateAdd(DateValue("1/1/1900"), Value(TextInput1.Text), Days), DateTimeFormat.ShortDate)

     

    Let me know if my answer helped solving your issue.

    If it did please accept as solution and give it a thumbs up so we can help others in the community.



    Greetings

  • Verified answer
    jschult Profile Picture
    9 on at

    Thanks for the input.  Unfortunately, the formula pitches an error:  DateAdd has some invlaid arguments, name 'Days' isn't recognized.  I changed 'Days' to TimeUnit.Days and it works fine!  Thanks again for pointing me in the right direction!

  • mmbr1606 Profile Picture
    14,629 Super User 2026 Season 1 on at

    yeah the Days is often the short version and powerapps does not always show the timeunit thing

     

    but glad that i was able to help

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 416 Most Valuable Professional

#2
11manish Profile Picture

11manish 205 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 128 Super User 2026 Season 2

Last 30 days Overall leaderboard