Which of the following expressions can be used to show what hour was 12 hours prior to the date from the variable?

A developer has defined a variable named "CurrentDate" of type Date Time.

Which of the following expressions can be used to show what hour was 12 hours prior to the date from the variable?
A . CurrentDate.AddHours(-12).Hour
B . Date Time.SubtractHours(CurrentDate, 12).Hour
C . CurrentDate.SubtractHours(12).Hour
D . Date Time.AddHours(CurrentDate, -12).Hour

Answer: A

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments