Data extraction on first date

I need to get the first dateTime expression from this text:

The success allowed us to launch a new educational program for local youth, with the first session starting on 22.04.2018 23:59:55. The final quarter of the year, leading up to the holiday break on 24.04.2018 09:44:02, was dedicated to planning for an even more ambitious schedule for the upcoming year.

Any suggestions? Thx.

Hey @ba12235590747

try this approach using assign activity
firstDateTime = System.Text.RegularExpressions.Regex.Match(YourText, "\d{2}\.\d{2}\.\d{4}\s\d{2}:\d{2}:\d{2}").Value

Cheers :slight_smile:

1 Like

Hi @ba12235590747

inputText = "The success allowed us to launch a new educational program for local youth, with the first session starting on 22.04.2018 23:59:55. The final quarter of the year, leading up to the holiday break on 24.04.2018 09:44:02, was dedicated to planning for an even more ambitious schedule for the upcoming year."

outputText = System.Text.RegularExpressions.Regex.Match(YourText, "(\d+\.?\d+\.?\d+\s*\d+\:?\d+\:\d+)").Value.Trim()
1 Like

We can try this way also: pattern - \d{2}.\d{2}.\d{4}\s\d{2}:\d{2}:\d{2}

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