Extract the send date and put into excel

test.zip (9.2 KB)
Test.mht where contain our sent date

This is my main.xaml
Main.xaml (23.8 KB)

I was told to enhance this process from my automation now
i need to extract the date out
image

then format it to DD/MM/YYYY

Then put it into D2 where this is our Date in Column then follow by D3 etc if there is 2 mht file
Test.xlsx (9.1 KB)

How can i do this as well?

@xxGoRpa

How are you currently getting the data?

Also if you are gettinng as stringg…

Then you can just get the text after sent on using regex

(?<=Sent on:).*

Cheers

this is done previously save to an mht file

@xxgorpa

Can you tell from where you want to extract?

Mht file can be read using read file if that is what you want to read

Cheers

extract this
Sent: Tuesday, January 16, 2024 8:51 PM

I wan this Tuesday, January 16, 2024 8:51 PM
to be formated as well to DD/MM/YYYY
Then paste into D2 Cell under Date In

Hi ,

First create a loop for each .mht file
then for current mht add below steps:

  1. Open .mht in browser
  2. Use Get text activity to get date text keeping ‘sent’ as anchor.
  3. create variable formattedDate assign its value to "(DateTime.ParseExact(dateString, “dddd, MMMM d, yyyy h:mm tt”, CultureInfo.InvariantCulture)).ToString(“dd/mm/yyyy”)
  4. Afterthat use writerange activity to write value to (“D”+(index+2).Tostring)
    "
    I hope this will help
1 Like

Thanks let me try and get back to you !

i got the formattedDate now

but how can i add this string to my data column in column D?

Got it :slight_smile:

This is what i do

I add row then append

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