我有一个日期为字符串类型的集合,sush as:
<html >
<head>
<title></title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.min.js"></script>
</head>
<body ng-app="" ng-controller="studentController" ng-init="countries=[{name:'India',language:'Hindi'},{name:'United States',language:'English'}]">
<div>
Enter first name: <input type="text" ng-model="student.firstname">
Student Name {{student.fullname()}}!!
</div>
<script>
function studentController($scope) {
$scope.student = {
firstname: "Fname",
lastname: "Lname",
fullname: function () {
var studObj;
studObj = $scope.student;
return studObj.firstname + ' ' + studObj.lastname;
}
};
}
</script>
</body>
</html>
我需要在聚合时按UTC日期计算日期时间。我确实找到了在查询中投射字符串的任何方法。
新的ISODate(...)仅适用于文字
$ where - 不适用于聚合
可能吗?