cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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 

2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
Super User
Super User

Re: powerapps format Overdue 84 days

@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

Highlighted
Super User
Super User

Re: powerapps format Overdue 84 days

@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
Highlighted
Super User
Super User

Re: powerapps format Overdue 84 days

@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

Highlighted
Post Prodigy
Post Prodigy

Re: powerapps format Overdue 84 days

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 

Highlighted
Super User
Super User

Re: powerapps format Overdue 84 days

@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

Highlighted
Post Prodigy
Post Prodigy

Re: powerapps format Overdue 84 days

Thank you so much  

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

Top Solution Authors
Top Kudoed Authors
Users online (7,338)