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

Unlimited Access

Get Unlimited Contributor Access to the all ExamTopics Exams!
Take advantage of PDF Files for 1000+ Exams along with community discussions and pass IT Certification Exams Easily.

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
EricHsu
5 days, 12 hours 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 1 times
...
ramziothmane
1 week, 6 days 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 1 times
...
kingkayy
3 weeks 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
2 months, 3 weeks 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 ...