Skip to main content

 

For example string is : "Date is 05/01/2022 on 01.30 PM "

from above string , only extract date and time removing other words.

How to use Regular expression ?

or any other way to extract only date and time from string?

 

 

Hi @Rajkumar Jagdale​ 

 

You can use String Package. Use 'Substring" , " Extarct".

or

please refer below similar qustion

 

https://apeople.automationanywhere.com/s/question/0D52t00000s7dfsCAA/string-to-date-conversion-in-a2019-hello-i-am-extracting-date-from-xml-document-and-want-to-convert-it-to-date-so-that-i-can-compare-it-can-somebody-guide-me-how-to-convert-string-to-date-in-a2019/p>

 


Hi @Rajkumar Jagdale​ ,

 

You can download the Regex Tools Package from the bot store and use the Regex Tools: Extract a Regex Match Action after passing in the pattern:

\d+?\/\d+?\/\d+

 

image 

Or you can use the String: Replace Action with the following pattern:

 

image 

Kind Regards,

Ashwin A.K

 


Reply