What is the filter expression for get exchange mails

For example i want to get one date to another date in get exchange mails

Like for example i give dates for input dialogue box and another date in dialogue box so my final output should be stored in one expression, like for ex i give input as 24-10-2022 to 28-10-2022 so for this how to write expression in exchange get mails to get from inbox?

Also i want to get dates like from sent items so for this i have to give input date only so for this how to write filter expression

HI @sathish_Kumar6

Here are some of the examples

You can also try this
get the mails and loop through with for each (property as Net.Mail.Message) and use if condition inside for each and give your condition and process it

Regards
Sudharsan

Hi @sathish_Kumar6

You can filter using “received: >=10/24/2022 AND received: <=10/28/2022”.

you can get the values from the dailog box and then do a concat like “receivd: >=” + value1 + “AND received: <=” + value2

Or Alternately get all mails and loop through and use if condition

cheers

1 Like

thanks for the reply, sorry for the delayed response but im getting dates as from 25 not 24

image

Hi @sathish_Kumar6

Try changing the date in filter and also check if there are any mails on that day.

Should help

Please mark solution and close the thread as others can also get help

cheers

“received: >=10/24/2022 AND received: <=10/28/2022”
image

im getting output in mentioned excel format but could you let me know like how to convert? dd/mm/yyyy hh:mm:ss

Hi @sathish_Kumar6

You can use before pasting write datevar.Tostring(“dd/mm/yyyy hh:mm:ss”)

and also make sure in excel the cell format is proper

If not add a '(single quote infront of the date so that excel thinks it as string and will not reformat

cheers

Hi @sathish_Kumar6

Can we close this please. As for one type of question one thread needs to be used and then closed. If you have any more questions feel free to open new threads. That way answers can be segregated and made available for others as well

On top I have posted how to mark a solution and close. Please follow the steps

cheers

Still he did not get the Answer not correctly @Anil_G

The data is not filtered properly right ? @sathish_Kumar6

Hi @Gokul001

The filter is working he needs how to format the date.

FYI - What is the filter expression for get exchange mails - #4 by sathish_Kumar6

cheers

Can you look over post of @sathish_Kumar6

@Anil_G

Hi @Gokul001

Yes please. I did and its more on getting mails between dates. I dont mind giving the same on elaboration but crux is solved I believe

cheers

okay thanks i will create new topic for this @Anil_G

1 Like

Hi @sathish_Kumar6

For dates you need not as well satish. This is more to give better solution for the problem that anyone has. Happy Automation.

Happy to solve the issues any time. @sathish_Kumar6 thanks for the reply again on clarifying it

cheers

i know im not good at dates so im sorry

Hi @sathish_Kumar6

Totally understandable. We are all on same page. We learn daily.

cheers

Hi @sathish_Kumar6

For Date check out this expression

DateTime.ParseExact(StringInput.ToString,"ddd, dd MMM yyy HH:mm:ss K",System.Globalization.CultureInfo.InvariantCulture).ToString("dd/MM/yyyy hh:mm:ss")

image

Check out the tutorial

Regards
Gokul

2 Likes

thanks for the reply…i tried but i got some assign errors

You can create the new topic for that error.

Thanks

1 Like

sure thanks