New Year Sale 2026! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

UiPath-ADAv1 Exam - Topic 5 Question 50 Discussion

Actual exam question for UiPath's UiPath-ADAv1 exam
Question #: 50
Topic #: 5
[All UiPath-ADAv1 Questions]

A developer has defined a variable named "CurrentDate" of type Date Time. Which option best expressions can be used to show what hour was 12 hours prior to the date from the variable?

Show Suggested Answer Hide Answer
Suggested Answer: A

Contribute your Thoughts:

0/2000 characters
Arlette
5 days ago
I remember something similar where we had to manipulate date and time objects. Maybe it's something like CurrentDate.AddHours(-12)?
upvoted 0 times
...
Mel
10 days ago
I think we might need to use a method to subtract hours from the CurrentDate variable, but I'm not entirely sure which one.
upvoted 0 times
...
Clay
15 days ago
Easy peasy! I'd just do CurrentDate.AddHours(-12) to get the date 12 hours prior. Shouldn't be too hard to figure out.
upvoted 0 times
...
Hershel
20 days ago
I'm a bit confused on the best way to approach this. Should I use AddHours or SubtractHours? I'll have to double-check the documentation to make sure I get the right expression.
upvoted 0 times
...
Ma
25 days ago
No problem, I've got this. I'd use CurrentDate.AddHours(-12) to get the date 12 hours earlier.
upvoted 0 times
...
Antione
1 month ago
Okay, let me think this through. I need to subtract 12 hours from the CurrentDate variable. I'm not sure if I should use AddHours or SubtractHours, but I'll try AddHours(-12).
upvoted 0 times
...
Gearldine
1 month ago
Hmm, this seems straightforward. I'd use the DateTime.AddHours(-12) method to get the date 12 hours prior.
upvoted 0 times
...

Save Cancel