ISO Week Date Year. Can be any expression that evaluates to a number.
Value range: 1-9999
If the number specified is outside this range, $dateFromParts errors. Starting in MongoDB 4.4, the lower bound for this value is 1. In previous versions of MongoDB, the lower bound was 0.
Week of year. Can be any expression that evaluates to a number.
Defaults to 1.
Value range: 1-53
Starting in MongoDB 4.0, if the number specified is outside this range, $dateFromParts incorporates the difference in the date calculation. See Value Range for examples.
Day of week (Monday 1 - Sunday 7). Can be any expression that evaluates to a number.
Defaults to 1.
Value range: 1-7
Starting in MongoDB 4.0, if the number specified is outside this range, $dateFromParts incorporates the difference in the date calculation. See Value Range for examples.
Calendar year. Can be any expression that evaluates to a number.
Value range: 1-9999
If the number specified is outside this range, $dateFromParts errors. Starting in MongoDB 4.4, the lower bound for this value is 1. In previous versions of MongoDB, the lower bound was 0.
Month. Can be any expression that evaluates to a number.
Defaults to 1.
Value range: 1-12
Starting in MongoDB 4.0, if the number specified is outside this range, $dateFromParts incorporates the difference in the date calculation. See Value Range for examples.
Day of month. Can be any expression that evaluates to a number.
Defaults to 1.
Value range: 1-31
Starting in MongoDB 4.0, if the number specified is outside this range, $dateFromParts incorporates the difference in the date calculation. See Value Range for examples.
Hour. Can be any expression that evaluates to a number.
Defaults to 0.
Value range: 0-23
Starting in MongoDB 4.0, if the number specified is outside this range, $dateFromParts incorporates the difference in the date calculation. See Value Range for examples.
Minute. Can be any expression that evaluates to a number.
Defaults to 0.
Value range: 0-59 Starting in MongoDB 4.0, if the number specified is outside this range, $dateFromParts incorporates the difference in the date calculation. See Value Range for examples.
Second. Can be any expression that evaluates to a number.
Defaults to 0.
Value range: 0-59
Starting in MongoDB 4.0, if the number specified is outside this range, $dateFromParts incorporates the difference in the date calculation. See Value Range for examples.
Millisecond. Can be any expression that evaluates to a number.
Defaults to 0.
Value range: 0-999
Starting in MongoDB 4.0, if the number specified is outside this range, $dateFromParts incorporates the difference in the date calculation. See Value Range for examples.
The timezone to carry out the operation.
Generated using TypeDoc
Constructs a BSON Date object given the date's constituent parts.
3.6
https://docs.mongodb.com/manual/reference/operator/aggregation/dateFromParts/#mongodb-expression-exp.-dateFromParts