1.

Which of the following returns the hour for a date as a number between 0 and 23?(a) $minute(b) $hour(c) $seconds(d) All of the mentionedThis question was addressed to me during an internship interview.Question is from Pipeline Operators topic in division Aggregation Concepts and Aggregation Mechanics of MongoDB

Answer»

Right choice is (B) $hour

Easy explanation: The ARGUMENT in hour STATEMENT can be any EXPRESSION as long as it resolves to a DATE.



Discussion

No Comment Found

Related InterviewSolutions