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 III
Super User III

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 III
Super User III

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 III
Super User III

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 III
Super User III

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

Power Platform Community Conference

Check out the on demand sessions that are available now!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

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