Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
exam questions

Exam UiADPv1 All Questions

View all questions & answers for the UiADPv1 exam

Exam UiADPv1 topic 1 question 144 discussion

Actual exam question from UiPath 's UiADPv1
Question #: 144
Topic #: 1
[All UiADPv1 Questions]

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?

  • A. (DateTime.Now - DateTime. ParseExact(DateString, “dd MMM yyyy”, Cultureinfo.InvariantCulture)).Days <7
  • B. (DateTime.Now - DateTime.ParseExact(DateString, “dd MMM yyyy”, Cultureinfo. InvariantCulture)). AddDays(-7) > 0
  • C. (DateTime.Now - DateTime.ParseExact(DateString, “d MMM yyyy”, Cultureinfo. InvariantCulture)).Days < 7
  • D. DateTime.Parse(DateTime.Now - DateString).Days <7
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
BenAndBen
4 months ago
Selected Answer: C
Answer is C. "d MMM yyyy" = "3 Mar 2023" while "dd MMM yyyy" = "03 Mar 2023"
upvoted 1 times
...
EricHsu
6 months, 3 weeks ago
Selected Answer: C
C is the correct, the formate "d MMM yyyy" can pass throw the both case the sentence give. test by the studio
upvoted 2 times
...
ramziothmane
7 months ago
Selected Answer: C
C is the correct one because for this case 3 Mar 2023 its in format "d MMM yyyy" otherwise it should be 03 Mar 2023
upvoted 2 times
...
kingkayy
7 months, 1 week ago
Selected Answer: A
B - subtracts 7 days from the difference between the dates, which isn't a requirement C - 'dd' for day in the format string. But here it is just a 'd' D - subtract a string (DateString) from a DateTime object would not work.
upvoted 1 times
...
AndresPC
9 months, 1 week ago
A is the correct one
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
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.

SaveCancel
Loading ...