Optional
day?: NumberExpressionDay 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.
Optional
hour?: NumberExpressionHour. 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.
Optional
isoDay 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.
Optional
isoWeek 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.
Optional
isoISO 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.
Optional
millisecond?: NumberExpressionMillisecond. 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.
Optional
minute?: NumberExpressionMinute. 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.
Optional
month?: NumberExpressionMonth. 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.
Optional
second?: NumberExpressionSecond. 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.
Optional
timezone?: tzExpressionThe timezone to carry out the operation.
Optional
year?: NumberExpressionCalendar 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.
Generated using TypeDoc
Constructs a BSON Date object given the date's constituent parts.