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 Apps
Unanswered

Date Format Type

(0) ShareShare
ReportReport
Posted on by 18

Hey,

 

I'm having issues trying to filter a gallery via today and 3 days earlier. From looking around, my issue is I had my date as a 'text' format and this stopped me from looking at this field properly.

What is the correct way to do this?

 

On my SubmitForm page, my DataCard looks at a label which now uses "Text( Today(), "[$-en-US]dd-mm-yy" )" to get the date.

How does this return a 'text' data type?

 

I went into my excel and tried to just format the entire column as a 'date' but that gave me a whole heap of bizarre bugs.

 

Thanks a lot.

Categories:
I have the same question (0)
  • eka24 Profile Picture
    20,925 on at

    Showing the formula on your Gallery items will help.

    But try this:
    Filter(Datasource,DateDiff(ThisItem.DateColumn,Today(),Days)>=3)

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • powerappelec Profile Picture
    18 on at

    Hi @eka24 

     

    Well I get an error of "Invalid Argument Type (text), Expecting DateTime Value instead)."

     

    Thanks

     

     

     

  • eka24 Profile Picture
    20,925 on at

    Please show the formula for correction.

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • powerappelec Profile Picture
    18 on at

    @eka24 , before I even get to viewing my gallery, I want to display all entries from the last 3 days.

    I currently display ALL through "CountIf(Tickets, Owner=User().FullName)" on my Text Box. This works with no issues.

     

    If I just want to count the last 3 days irrespective of user (for simplicity sake).

    "CountIf(Tickets,DateDiff(DateCreated,Today(),Days)>=3)" Does not work.

     

  • eka24 Profile Picture
    20,925 on at

    Please do you want to count and display into a textbox

    Or

    You want to display items on  a Gallery

    Showing a screen shot will give clear picture

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • powerappelec Profile Picture
    18 on at

    I'm going to do both. 

     

    But I only need a hand figuring out "count and display into a textbox" because from here I can work out the second solution quite easily. @eka24 

  • powerappelec Profile Picture
    18 on at

    Hey @eka24

     

    Here is Error (attached).

    Cheers.

     

     
    Error.jpg
    Error.jpg
  • timl Profile Picture
    37,283 Super User 2026 Season 2 on at

    Hi @powerappelec 

    If the DateCreated column in your Excel spreadsheet were a text field to begin with and you changed it to a date field (which is what you correctly need to do), you would need to refresh your Excel data source so that PowerApps picks up this change to the data type.

    To refresh a data source, you would click the View > data sources menu item, and click the 3 dots next to your Excel data source.

    Can you confirm that you've done this, because that would explain some of these errors that you see?

  • powerappelec Profile Picture
    18 on at

    Hey @timl,

     

    Thanks for chiming in!

    Ok more buggery... I updated the data source and all the errors cleared! Yet the value reads 0.

    I tried to submit another ticket after I updated the data source and it submitted it as "2/4/2020 13:00"

    Which is odd, because my test entry prior to updating the data source appeared as "2/5/2020".

    *The month rolling back by 1 is not a type on my post*

     

    Any ideas?

  • timl Profile Picture
    37,283 Super User 2026 Season 2 on at

    Hi @powerappelec 

    Just to confirm, you're saving the value "2/5/2020" in PowerApps, but you see "2/4/2020 13:00" when you open the record in Excel?

    If you open the record in PowerApps, does it show up as "2/5/2020"?

    By default, PowerApps converts datetimes to UTC to support users that span multiple time zones. But it's odd how there's a 1 month difference.

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 379 Most Valuable Professional

#2
11manish Profile Picture

11manish 203 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 128 Super User 2026 Season 2

Last 30 days Overall leaderboard