Showing results for 
Search instead for 
Did you mean: 
Not applicable

Extract Time from sharepoint column

I have a small requirement to extract a part of text from a SharePoint column. 
The format of text is :

Name of the employee - Date and Time - Comments

Name of the employee - Date and Time - Comments

Name of the employee - Date and Time - comments

. There can be multiple comments in that column.

How do i extract Date and Time of the last comment in the comment history column? For example: from the above format of text i would like to extract Date and Time from the last comments. 
I have been trying to use Last function along with Split function but i am able to achieve only name of the employee or Comments column and not date and time column. 
How do i extract the last date and time column? 
Please help!!


Super User II
Super User II


Do you have separate columns for the Employee, date/time and comments or is it all in one column in your list separated by "-"'?

Super User II
Super User II

Try this to parse out the date/time 


                                  "Name of the employee - Date and Time - Comments", "-"
                       ). Result, "-"



Not applicable

@Drrickryp it is in one column separated by "-"

Not applicable

@Drrickryp the above code did not provide the required output. i was able to extract the last comments from the column but not date.

Helpful resources

PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Carousel April Dunnam Updated 768x460.jpg

Urdu Hindi D365 Bootcamp

Dont miss our very own April Dunnam’s The Developer Guide to the Galaxy! Find out what the Power Platform has to offer for the traditional developer.

Top Solution Authors
Top Kudoed Authors
Users online (2,129)