cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Ramole
Post Prodigy
Post Prodigy

powerapps format Overdue 84 days

Hi 

 

I would like to know if there is a way to show on the gallery if due date like this format like Overdue 84 days, and also this "Edited Friday at 08:50 PM" 

 

Please help Thanks 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also close the item., please consider giving it Thumbs Up.
2 ACCEPTED SOLUTIONS

Accepted Solutions
mdevaney
Super User III
Super User III

@Ramole 

Suppose your Collection looks like this.

 

ClearCollect(
    colDueDates,
    {DueDate: Date(2019,10,8), Modified: Date(2019,12,4)+Time(12,25,00)},
    {DueDate: Date(2019,11,3), Modified: Date(2019,11,30)+Time(18,47,00)},
    {DueDate: Date(2019,12,20), Modified: Date(2019,12,5)+Time(9,30,00)}
);

 

To show days overdue place a label in the gallery and use this code in the Text property

 

"Overdue "&DateDiff(ThisItem.DueDate,Today(),Days)&" day(s)"

 

The result will look like this

 

Overdue 59 day(s)

 

The problem with my code above is some text will still appear even if an item is not overdue.  We can show a blank label for this scenario by using the code below.

 

If(
    DateDiff(ThisItem.DueDate,Today(),Days)>0,
    "Overdue "&DateDiff(ThisItem.DueDate,Today(),Days)&" days",
    Blank()
)

 

To show the Last Edited date create another label and use this code in the Text property

 

"Edited "&Text(ThisItem.Modified,ShortDateTime)

 

The result will look like this.  You cannot use a date format like "Edited Friday at 12:25PM" because it you could be referring to any Friday ever since the beginning of time.

 

"Edited 12/4/2019 12:25PM"

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

@Ramole 

Put this code in the Text property of a label

 

"Edited "&Text(ThisItem.Modified,"mmmm "&ShortDateTime)

 

The result will look like this.

 

"Edited Friday 12/4/2019 12:25PM"

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

4 REPLIES 4
mdevaney
Super User III
Super User III

@Ramole 

Suppose your Collection looks like this.

 

ClearCollect(
    colDueDates,
    {DueDate: Date(2019,10,8), Modified: Date(2019,12,4)+Time(12,25,00)},
    {DueDate: Date(2019,11,3), Modified: Date(2019,11,30)+Time(18,47,00)},
    {DueDate: Date(2019,12,20), Modified: Date(2019,12,5)+Time(9,30,00)}
);

 

To show days overdue place a label in the gallery and use this code in the Text property

 

"Overdue "&DateDiff(ThisItem.DueDate,Today(),Days)&" day(s)"

 

The result will look like this

 

Overdue 59 day(s)

 

The problem with my code above is some text will still appear even if an item is not overdue.  We can show a blank label for this scenario by using the code below.

 

If(
    DateDiff(ThisItem.DueDate,Today(),Days)>0,
    "Overdue "&DateDiff(ThisItem.DueDate,Today(),Days)&" days",
    Blank()
)

 

To show the Last Edited date create another label and use this code in the Text property

 

"Edited "&Text(ThisItem.Modified,ShortDateTime)

 

The result will look like this.  You cannot use a date format like "Edited Friday at 12:25PM" because it you could be referring to any Friday ever since the beginning of time.

 

"Edited 12/4/2019 12:25PM"

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

Ramole
Post Prodigy
Post Prodigy

Hi 

Thank you for your help, the  "Edited Friday at 08:50 PM" i mean like this  "Edited Friday 12/6/2019 at 08:50 PM" 

 

Thanks 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also close the item., please consider giving it Thumbs Up.

@Ramole 

Put this code in the Text property of a label

 

"Edited "&Text(ThisItem.Modified,"mmmm "&ShortDateTime)

 

The result will look like this.

 

"Edited Friday 12/4/2019 12:25PM"

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

Thank you so much  

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also close the item., please consider giving it Thumbs Up.

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (51,363)