Date time questions

@ppr @prasath17 @prasath_S @Yoichi @I.S @aksh1yadav @abdel @J0ska @Nicolas_Trespalacios @afe.araromi
How to calculate the maximum/latest among three/four dates ?

how to retrieve the name of the attachment of email , attachment can be .msg .pdf .xls .xlsx format
retrieve the list of string as list of all the attachments of email ?
i dont need first attachment name with this : CType(mail.Attachments.FirstOrDefault,Attachment).Name

  1. To get latest date, store all your dates into array variable(say var1), then use var1.Max
  2. To get the attachments names, follow below steps:
    a. Use for loop to go through each mail(store mailitem in a variable “mail”),
    {
    b. Now prepare a variable(counter = 0) and also list(List1) to store attachments names,
    c. while counter < mail.Attachments.Count,
    {
    d. now you can get the attachment name using mail.Attachments.Item(counter).Name. This
    gives output as string. You can store this to List1
    e. Increase counter value by 1
    }
    }

To get the attachments names, follow below steps:

This is giving the names of attachments in the email body but not the attached files .
I didnt get this though

Hi Sakshi,

Please check this workflow. You will understand.
GetMailAttachmentNames.xaml (9.3 KB)

how to use max function in uipath , i am getting multiple date as list (list1) list of datatype as system.
consider dates like { [15.11.2020], [26.11.2020], [18.11.2020], [31.11.2020] } of type system.text.regular.expressions.Matches

@Mikolaj_Zielinski @arivu96 @prashant231082 @Manjuts90 @sandeepbht96

how to use max function for list of regular.expressions.matches datatype, i am getting multiple date as list (list1) list of datatype as system.
consider dates like { [25.07.2020], [26.08.2020], [26.08.2020], [26.09.2020] }
or may be something like
{ [05.06.2019], [18.09.2020], [26.04.2021], [31.12.2021] }
Assign: At least one object must implement IComparable.

or in other words

how to apply max function or max value from var of datatype System.Collections.Generic.IEnumerable<System.Text.RegularExpressions.match> ?
consider var1 like { [15.07.2020], [19.08.2020], [26.08.2020], [30.09.2020] }

  1. sort table Z-A order
  2. var = List(0) get the first item

similar way can i find the maximum element of the list ?

apply max function or max value from var of datatype System.Collections.Generic.IEnumerable<System.Text.RegularExpressions.match> ?
consider var1 like { [15.07.2020], [19.08.2020], [26.08.2020], [30.09.2020] }

Hi @Sakshi_Jain - please see one of the forum guidelines…

  • Don’t cross-post the same thing in multiple topics.

I think this is the same question you posted in 5 to 6 different posts…

1 Like

I’ve merged the posts into this topic.

1 Like