Exam UiPath-ADPv1 Topic 2 Question 58 Discussion

Actual exam question for UiPath's UiPath-ADPv1 exam
Question #: 58
Topic #: 2
A developer extracts a date from an email. The date will always be In the same format and always from the past. Some examples of this format are: "3 Mar 2023". "20 Nov 2021". The name of the variable where the date is saved is DateString What expression should the developer use to check If the extracted date is within the last 7 days?

Suggested Answer: C Vote an answer

* The date is in the format "d MMM yyyy" (e.g., "3 Mar 2023").
* The correct expression is: (DateTime.Now - DateTime.ParseExact(DateString, "d MMM yyyy", CultureInfo.InvariantCulture)).Days < 7.
* This expression calculates the difference in days between the current date (DateTime.Now) and the parsed date (DateTime.ParseExact(DateString, "d MMM yyyy", CultureInfo.InvariantCulture)).
* It then checks if this difference is less than 7 days, which means the date is within the last 7 days.

by apacheco05 at Feb 20, 2024, 05:47 PM

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
Nick name: Submit Cancel
apacheco05
2024-02-20 17:47:29
Selected Answer: A
A is the correct one since the are to dates and "d MMM yyyy" does not work is has to be "dd MMM yyyy"
upvoted 1 times
...
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

Contact Us

If you have any question please leave me your email address, we will reply and send email to you in 12 hours.

Our Working Time: ( GMT 0:00-15:00 ) From Monday to Saturday

Support: Contact now 

日本語 Deutsch 繁体中文 한국어