cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Extract timestamp from text field

Hi All,

 

I am trying to achieve a small requirement, where in I have a text column which stores the comments of users. 

 

The comment column contains : Timestamp User name and comment and there can be multiple comments in that text field added by different users.

 

So, i want to extract the latest comment timestamp and check whether that timestamp is older than a week.

How can i achieve this condition.


My data source is SharePoint.

 

Thank you in advance!

Cheers.

12 REPLIES 12

Hi @Anonymous :

Please try this code:

Last(Sort(AddColumns(Split(
    "RV - 13/01/2021 10:26 - Comments.
     JM - 14/01/2021 15:43 - ",
    Char(13)
),"Thedate",DateValue(Match(Result,"\d\d\/\d\d\/\d\d\d\d").FullMatch,"bg-BG")),Thedate,Ascending)).Thedate

 Best Regards,

Bof

Anonymous
Not applicable

@v-bofeng-msft same result achieved from the above code.

Jayant2_0-1612430960810.png

 

Anonymous
Not applicable

@v-bofeng-msft i was able to extract the last comment based upon the below formula, how do i extract the last date column as it is in the middle and not at first or last. First and last value are easily retrieved by First and last function. I use the separator as "-" and not char(13)
any suggestions?

Jayant2_0-1612434899179.png

 

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (1,639)