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 shown as number s...
Power Apps
Answered

Date shown as number string instead of date

(1) ShareShare
ReportReport
Posted on by 30

I have a form that has 3 different dates on it. One seems to work great but the other two aren't seen as dates in the form editor. I am able to copy the date picker from the working one to enter the dates and everything shows on the excel spreadsheet correctly when a new form is created or edited. BUT, when you view the info, only the first date shows as a date and othe two show as a number string. I can't get a datevalue() function to work or text(#,"dd/mm/yyyy"). Any ideas what will help? How do I changed the "Data type" that is in the edit fields window?Edit Fields on left, how it shows up on rightEdit Fields on left, how it shows up on right

Categories:
  • poweractivate Profile Picture
    11,078 Most Valuable Professional on at

    @ryanmcc 

     

    Try this:

     

    1. Select the Form Control from the Tree view on the left 

    2. Click Edit Fields

    3. Click Add field

     

    poweractivate_0-1665085195285.png

    Then

     

    4. Select the appropriate field you want that is of type Date / Time on your data source.

    5. Click Add

     

    poweractivate_0-1665085389882.png

    6. You should now see the new Data Card, and it should be of type Date / Time

     

    poweractivate_1-1665085470623.png

     

    See if it helps @ryanmcc 

  • ryanmcc Profile Picture
    30 on at

    @poweractivate  when I do that, the other two date fields are not in the Date data type.

  • poweractivate Profile Picture
    11,078 Most Valuable Professional on at

    @ryanmcc 

     

    If the data type on the data source is not Date/Time you cannot store a Date/Time value in there.


    Either create a new column of type Date/Time on the data source, or, you just cannot store a Date/Time and have to convert it to a Text representation of your choice.

     

    If you want, try this and see if it works:

     

     

    //pseudocode - change YourDateTime below to something appropriate for you
    Text( YourDateTime, DateTimeFormat.LongDateTime )

     

    more info:  Date/Time formatting with Text function

     

     

  • ryanmcc Profile Picture
    30 on at

    @poweractivate  - Agree, the frustrating part is all 3 columns in the data course are Time. All three show up correctly in the spreadsheet as dd/mm/yy hh:mm. For some reason, when the App is displaying the date/time, it is showing as the number string "4481.5173611111". I forget how excel converts form that number to a date but I know that number is a date. 

     

    I did try 

    Text( YourDateTime, DateTimeFormat.LongDate )

    but no luck. 

     

    ryanmcc_0-1665086096968.png

     

  • Verified answer
    poweractivate Profile Picture
    11,078 Most Valuable Professional on at

    @ryanmcc 

     

    If you use Excel data source it stores it like this

     

    Check if below formula converts that bizarre looking number to a Text version of the Date Time

     

    //psuedocode - change YourDateField_Value to what's appropriate for you - this is where your number like 44840.09375 goes, for example
    
    Text(
     DateAdd(
     DateTimeValue("1899-12-30 12:00:00 AM")
     ,RoundDown(
     (Value(YourDateField_Value) * 86400)
     ,0
     )
     ,TimeUnit.Seconds
     )
     ,ShortDateTime
    )

     

     

    Does it work @ryanmcc  ?

  • ryanmcc Profile Picture
    30 on at

    @poweractivate That worked!!! Awesome job, much appreciated! 

  • whuttn Profile Picture
    2 on at

    Hi @poweractivate 

     

    I am having a similar issue. I tried that formula and I got a character unexpected error. Any advice? 

     

    whuttn_0-1705555744876.png

     

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 236 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 207 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 169

Last 30 days Overall leaderboard