Google News
logo
MongoDB - Quiz(MCQ)
Which of the following returns year for particular date?
A)
$year
B)
$yearday
C)
$syearofmonth
D)
None of the above

Correct Answer :   $year


Explanation : $year returns the year for a date as a number (e.g. 2014).

Advertisement