web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Automate
Answered

Replace Dates

(0) ShareShare
ReportReport
Posted on by 132

Hi I have a Testlist, in this test are date values i want to replace the dates with nothing. (Remove the dates). So i used the Action to detect date entities to get all dates from the text. These Dates i want to replace. 

 

Zohaib1999_0-1708684135450.png

Zohaib1999_1-1708684169939.png

 

Zohaib1999_2-1708684189791.png

It doesn't work with the following screenshot: 

Zohaib1999_3-1708684238418.png

 

I have the same question (0)
  • Deenuji_Loganathan_ Profile Picture
    6,255 Moderator on at

    @Zohaib1999 

    Could you please share the testlist screenshot with values pls?

     

    Or Are you trying the replace the dates from below datatable?

    Deenuji_0-1708685450161.png

     

  • Zohaib1999 Profile Picture
    132 on at

    Zohaib1999_0-1708685357036.png

    The image shows the TextList* which i have with the dates. 

     

  • Zohaib1999 Profile Picture
    132 on at

    exactly

  • Deenuji_Loganathan_ Profile Picture
    6,255 Moderator on at

    @Zohaib1999 

    Here you go!! We have multiple ways to do that.

    But below is PAD way of doing(Not scripts):

    1. Create one more list variable as per your wish(In this example, I have created like Date_Replaced_Quelltext)

    2. Iterate the previous list(Quelltext) using foreach

    3. Replace date with empty string using regex

    4. Insert the new value into newly created list

    Deenuji_1-1708686308705.png

    Result:

    Deenuji_0-1708686272572.png

    Code:

    Variables.CreateNewList List=> QuellText
    Variables.AddItemToList Item: $'''21 23.02.2024''' List: QuellText
    Variables.AddItemToList Item: $'''00:00''' List: QuellText
    Variables.AddItemToList Item: $'''am''' List: QuellText
    Variables.AddItemToList Item: $'''bis''' List: QuellText
    Variables.AddItemToList Item: $'''23.02.2024''' List: QuellText
    Variables.AddItemToList Item: $'''Way 01.01.2024''' List: QuellText
    Variables.CreateNewList List=> Date_Replaced_QuellText
    LOOP FOREACH CurrentItem IN QuellText
    Text.Replace Text: CurrentItem TextToFind: $'''\\b\\d{2}\\.\\d{2}\\.\\d{4}\\b''' IsRegEx: True IgnoreCase: False ReplaceWith: $'''%''%''' ActivateEscapeSequences: False Result=> Replaced
    Variables.AddItemToList Item: Replaced List: Date_Replaced_QuellText
    END

     

    Thanks,

    Deenu

    -----------------------------------------------------------------------------------------------------------------------

    If I have answered your question, please mark it as Accepted solution. If you like my response, please give it a Thumbs Up. Thank you.

  • Zohaib1999 Profile Picture
    132 on at

    is it posssible to say i want all the information from this list to get replaced? 

    Zohaib1999_0-1708687195462.png

     

    Replace text action: 

    Zohaib1999_1-1708687231204.png

    Here i searched for %columnAsList% which shows the results of the dates (screenshot above). How should i write the code  %columnAsList% correctly? 

  • Deenuji_Loganathan_ Profile Picture
    6,255 Moderator on at

    @Zohaib1999 - Please follow the below screenshot

    Deenuji_0-1708687549379.png

    Text to find value(Regex): \b\d{2}\.\d{2}\.\d{4}\b

     

    Thanks,

    Deenu

  • Zohaib1999 Profile Picture
    132 on at

    The Goal which I had was to get all the dates first as a variable in form of  %columnAsList%. These dates are in the %PDFText%. So i wanted to replace the dates from the PDFText with the %ColumnAsList% Results

  • Deenuji_Loganathan_ Profile Picture
    6,255 Moderator on at

    @Zohaib1999 I'm quite confused. Could you please explain your full requirement with some screenshot?

  • Zohaib1999 Profile Picture
    132 on at

    First Step : Analyze the Dates from the -PDFText- 

    Zohaib1999_0-1708688882305.png

    Zohaib1999_3-1708689217503.png

     

     

    Second: Fill the Results in a TextList

    Zohaib1999_1-1708688914336.png

     

    Replace the Results with nothing or test

    Zohaib1999_2-1708689125128.png

     

  • Deenuji_Loganathan_ Profile Picture
    6,255 Moderator on at

    @Zohaib1999 

    In that case, there would be no need for a round trip approach to substitute the dates in the "Recognizedentities" datatable.

     

    Instead of converting it into a list, utilize the "Find or Replace in DataTable" action directly, located within the "Variables --> DataTable" package, and incorporate your parameters as illustrated below.

    Deenuji_0-1708690417257.png

     

    Text to find value(Regex): \b\d{2}\.\d{2}\.\d{2}(?:\d{2})?\b

     

    Result:

    Deenuji_1-1708690882872.png

     

     

    Thanks,

    Deenu

    -----------------------------------------------------------------------------------------------------------------------

    If I have answered your question, please mark it as Accepted solution. If you like my response, please give it a Thumbs Up. Thank you.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 248 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 204

#3
Haque Profile Picture

Haque 179

Last 30 days Overall leaderboard