Operator Scope of Action:
Operator First Added:
Returns the day number for the Date-type attribute specified. Value range is 1-7. Days number from 1 (Monday) to 7 (Sunday). This numbering allows easy testing for weekday (#1-5) vs. weekend (#6-7).
This operator is read-only and cannot be used to change a Date attributes value.
$MyNumber = $MyDate.weekday;
Thus if the day of $MyDate is Tuesday, $MyNumber would be 2.