Exam UiADPv1 All QuestionsBrowse all questions from this exam
Question 59

A developer has defined a variable named “CurrentDate” of type DateTime. Which of the following expressions can be used to show what hour was 12 hours prior to the date from the variable?

    Correct Answer: B

    To calculate what hour was 12 hours prior to a given DateTime variable named 'CurrentDate', use the AddHours method with a negative value. The correct expression is CurrentDate.AddHours(-12).Hour.

Discussion
ChoudayyaOption: B

B is the correct answer

AndresPCOption: B

B is the correct answer