I can format the Get-Date
cmdlet no problem like this:
$date = Get-Date -format "yyyyMMdd"
But once I've got a date in a variable, how do I format it? The statement below
$dateStr = $date -format "yyyMMdd"
returns this error:
"You must provide a value expression
on the right-hand side of the '-f'
operator"
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…