Split last digit in string

Hello,
I am extracted a date from a site, i want to extract the last digit from the date below, which is 2? can any one assist on this

Jan 10, 2021 2

Thanks in advance

String.split(" ").last()

I have the text like the below
“Created:
Jan 10, 2021 2:43 PM”

I did Variable_Name.Split(":"c)(1).toString
then I got “Jan 10, 2021 2” if i do another split with " " i will get only 2

You want to extraact “2” from here right?

Ex: If its 5:18 PM then 5…?? Please clarify

I want to extract the date “Jan 10, 2021” only

@mosa_sleeman - You can try with the below regex pattern…

Update: Please find the starter help here:

Thanks

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.