Interview Questions on File Activities and Date Functions

Hi Community,

Below are the questions faced in an interview. Could you please help me with the answers.
I know few of the answers but not clearly.

image

Any help would be appreciated.
Thanks in Advance :slight_smile:

1 Like

Hi @Vaishnav_Tej ,

  • 132- You can use the “For Each file in folder” activity to get files from a folder.

  • 133- There is a property in the “For each file in folder” activity called OrderBy, Which lets you choose the latest file by setting it to “Created Date Newest first”.

  • 134- By using the “File Exist” activity. The output of this activity is Boolean.

  • 135- DateTime.Now.ToString("dd-MM-yyyy hh:mm:ss")

  • 136- If(Date.Now.DayOfWeek.Equals(“Saturday”),“True”,“False”)

  • 137- We can use “Split” to do so.

Split(StrVar,“i”)(1)
  • 138- Split will work in dynamic cases as well.
Split(StrVar,“i”)(1)

139- If we just split the “interview” string without giving any separator then the output datatype will be StringArray containing only a single item in it. That is the “Interview” itself.

140- Just use the Split and try it by your self. let me know if you’re facing any issue.
141- Follow this Regular expression in UiPath for more information.

Regards,
Ashutosh Gupta

1 Like