cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Virikefe22
Helper V
Helper V

Picking Last and Current Update

Hello, I wish to pick just the date's time only (1) without the date showing in each case. And also show only name (2) of the newest record in each case. The column names in the SP list are Shift Coordinator (DataCardValue1) and Date (LastUpdate) respectively.

Virikefe22_0-1668509942693.png

Virikefe22_0-1668513674375.png

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

HI @Virikefe22 ,
Try using this - 

With({_dateF:Split(First(Sort(SPListName, Created, Descending)).Date," ")},Last(FirstN(_dateF,2)).Result & Last(FirstN(_dateF,3)).Result)

 


Did you like my post? Please give it a thumbs up! Did I resolve your issue? Please click Accept as Solution to close the topic and so other members of the community can find solutions more easily.

View solution in original post

5 REPLIES 5
NandiniBhagya20
Solution Sage
Solution Sage

HI @Virikefe22 ,

 

You can use below formula to capture newest record - 

First(Sort(SPListName, Created, Descending)).'Shift Coordinator'

 

To display time part of a date and time field you can use split function - 

With({_dateF:Split(ThisItem.DateTimeColumn," ")},Last(FirstN(_dateF,2)).Result & Last(FirstN(_dateF,3)).Result)


Did you like my post? Please give it a thumbs up! Did I resolve your issue? Please click Accept as Solution to close the topic and so other members of the community can find solutions more easily.

First(Sort(SPListName, Created, Descending)).'Shift Coordinator' (this line worked)

But the second didn't work: With({_dateF:Split(ThisItem.DateTimeColumn," ")},Last(FirstN(_dateF,2)).Result & Last(FirstN(_dateF,3)).Result)

It's showing nothing.

Virikefe22_0-1668517765038.png

REMEMBER PLS: Only the time is what I want to show in the (1) from the SP List (1) previous record before the last in the SP list.

Virikefe22_1-1668517841178.png

 

HI @Virikefe22 ,
Try using this - 

With({_dateF:Split(First(Sort(SPListName, Created, Descending)).Date," ")},Last(FirstN(_dateF,2)).Result & Last(FirstN(_dateF,3)).Result)

 


Did you like my post? Please give it a thumbs up! Did I resolve your issue? Please click Accept as Solution to close the topic and so other members of the community can find solutions more easily.

Worked perfectly now. Thanks @NandiniBhagya20 

Hello @NandiniBhagya20 

Little more issue. The last update according the to the SPList is 8.00AM and not 9.00AM

Virikefe22_0-1668522506962.png

With your solution, it's showing the current time (2) and not the previous time (1) before the current (last) time.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,616)