cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Ramole
Level: Powered On

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

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

Ramole
Level: Powered On

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 

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

Ramole
Level: Powered On

Re: powerapps format Overdue 84 days

Thank you so much  

Helpful resources

Announcements
thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (5,691)