Skip to main content
Flight Specialist | Tier 4
January 8, 2022
Question

How to Extract Date and Time from String ?

  • January 8, 2022
  • 2 replies
  • 954 views

 

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?

 

 

    2 replies

    Most Valuable Pathfinder
    January 8, 2022
    Ashwin A.K
    Navigator | Tier 3
    January 9, 2022

    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:

    [A-z\s]+|\d+\.\d+

     

    image 

    Kind Regards,

    Ashwin A.K

     

    Blogs at TheCodingTheory - https://www.thecodingtheory.com